This tutorials explains how we can use the screens, widgets, analytics, and SDK functions to use a single chatroom as a community in your app. The following steps help you launch a community in your app using LikeMinds React Native Chat SDK.
Customizing Themes According to Gender
Personalizing your app's theme based on gender preferences enhances user experience. Follow the code snippet below to customize themes.
import { STYLES } from "@likeminds.community/chat-rn-core"
const themeStyles =
gender === "male"
? {
fontColor: "black",
primaryColor: "#B7D340",
secondaryColor: "#B7D340",
lightBackgroundColor: "hsl(161, 67%, 91%)",
fontTypes: {
LIGHT: "NunitoSans-Light",
MEDIUM: "NunitoSans-Medium",
SEMI_BOLD: "NunitoSans-SemiBold",
BOLD: "NunitoSans-Bold",
BLACK: "NunitoSans-Black",
},
}
: {
fontColor: "black",
primaryColor: "#553B3B",
secondaryColor: "#553B3B",
lightBackgroundColor: "hsl(11,53%,94%)",
fontTypes: {
LIGHT: "NunitoSans-Light",
MEDIUM: "NunitoSans-Medium",
SEMI_BOLD: "NunitoSans-SemiBold",
BOLD: "NunitoSans-Bold",
BLACK: "NunitoSans-Black",
},
}
if (themeStyles) {
STYLES.setTheme(themeStyles)
}
How to show the group detail screen
To reveal vital details such as participant lists and other insights about the group, utilize these two APIs and display the data in alignment with your app's design.
Step 1: Retrieve Chatroom Details
Chatroom details give a complete overview, offering developers a seamless way to access vital information. From participant counts to detailed chatroom insights.
Step 2: Access the Participants List
Explore the list of participants, providing a detailed lineup of individuals actively engaged in your conversations.
Step 3: Leave Community
The Leave Community method allows users to gracefully exit a community by handling the necessary backend processes, such as updating membership records and adjusting access permissions. This function ensures a smooth user experience while departing from a community, maintaining data integrity and security.