Community Chat Screen
Overview
The LMCommunityChatViewController displays a list of chatrooms and an explore tab, provides navigation to individual chat screens, search functionality, and a user profile view.
File Location:
LMCommunityChatViewController.swift
Functionality
Protocols
This screen implements LMChatHomeFeedListView protocol
UI Components
feedListView: An instance ofLMChatHomeFeedListViewthat displays the list of chatrooms and explore tab.profileIcon: AnLMImageViewshowing the user's profile picture in the navigation bar.
Methods
setupRightItemBars(): Sets up the right navigation bar items (profile and search).searchBarItemClicked(): Handles taps on the search icon.profileItemClicked(): Handles taps on the profile icon.
Customization
To customize the LMCommunityChatViewController, subclass it and override the necessary methods:
LMCommunityChatViewController.swift
class CustomGroupFeedViewController: LMCommunityChatViewController {
override func profileItemClicked() {
super.profileItemClicked()
// Add custom handling here
}
}
AppDelegate.swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
LMCoreComponents.shared.communityChatScreen = CustomHomeFeedListView.self
// ...
return true
}