Contacts
#
Header ComponentThe headerComponent includes a default title as Contacts, a back button that takes the user to the previous view. Each property corresponds to the elements in the navigation bar of the view controller.
The following table shows the parameters of the configure method of the headerComponent.
Parameter name | Type |
---|---|
delegate | MFUICreateChatModuleHeaderDelegate |
theme | MFContactListTheme |
#
List ComponentThe listComponent shows a list of all contacts after the contacts being synced. The following table shows the parameters of the configure method of the listComponent.
Parameter name | Type |
---|---|
delegate | MFUICreateChatModuleListDelegate |
dataSource | MFUICreateChatModuleListDataSource |
theme | MFContactListTheme |
#
View ModelThe MFUICreateChatViewController class uses a view model that is a type of the MFUICreateChatViewModel class. The view model is created in the initializer of the view controller through the createViewModel(contacts: type:)
method. When the view model object is created, it retrieves contacts list data from Chat SDK to the view controller and updates the view through the createChatViewModel(_:didChangeUsers:needsToReload:)
event.
The following table shows the parameters list of the createViewModel method
Parameter name | Type |
---|---|
contacts | ProfileDetails |
type | ChatCreationType = .newSinglehChat |
Used the following function to get the Users list from the SDK who are all using the same license key.
Argument | Type | Description |
---|---|---|
pageNo | int | Page number of user list default value 1 |
pageSize | int | Number of users per page default value 50 |
search | String | text characters for which search has to happen default value empty |
CALLBACK | FlyCompletionHandler | FlyCompletionHandler used as completion Handler |
#
Pagination and SearchContacts can be searched using search option.
Pagination is implemnted to fetch the user from API