Skip to main content

HomeFeed Item

Overview

The HomeFeedItem component is responsible for rendering individual feed items within the chat screen. It displays information such as the chatroom title, description, participants, and messages, and provides interaction options like joining a chatroom or viewing messages. The component also manages dynamic states like whether the user has joined a chatroom or if the chatroom is pinned.

GitHub File:

LMFeedMediaPreviewScreen

Styling Customisation

These styling customisations can be applied through the setHomeFeedStyle method on the

PropertyTypeDescription
avatarAvatarRepresents the styling for the avatar
titleTitleRepresents the styling for the title text
lastConversationLastConversationRepresents the styling for the last conversation text
unreadCountUnreadCountRepresents the styling for the unread message count
lastConversationTimeLastConversationTimeRepresents the styling for the last conversation time

Avatar

PropertyTypeDescription
borderRadiusstringDefines the border radius of avatar

Title

PropertyTypeDescription
colorstringDefines the color of title text
fontSizenumberDefines the font size of title text
fontFamilystringDefines the font family of title text

LastConversation

PropertyTypeDescription
colorstringDefines the color of the last conversation text
fontSizenumberDefines the font size of the last conversation text
fontFamilystringDefines the font family of the last conversation text

UnreadCount

PropertyTypeDescription
colorstringDefines the color of unread count text
fontSizenumberDefines the font size of unread count
fontFamilystringDefines the font family of unread count
borderRadiusstringDefines the border radius of unread count badge
backgroundColorstringDefines the background color of unread count badge

LastConversationTime

PropertyTypeDescription
colorstringDefines the color of the last conversation time
fontSizenumberDefines the font size of the last conversation time
fontFamilystringDefines the font family of the last conversation time

Usage Example

  • Call the setHomeFeedStyle method on the STYLES class to set styling customisations.
import {STYLES} from "@likeminds.community/chat-rn-core"

STYLES.setHomeFeedStyle({
avatar: {
borderRadius: 10,
},
title: {
color: 'blue',
fontSize: 20
},
lastConversation: {
fontSize: 20
},
lastConversationTime: {
fontSize: 16
}
})