CometChatCallLogs
is a Component that shows the list of Call Log available . By default, names are shown for all listed users, along with their avatar if available.
Call Logs
component is composed of the following BaseComponents:
Components | Description |
---|---|
CometChatListBase | CometChatListBase is a container component featuring a title, customizable background options, and a dedicated list view for seamless integration within your application’s interface. |
CometChatListItem | This component displays data retrieved from a CallLog object on a card, presenting a title and subtitle. |
CometChatCallLogs
being a custom view controller, offers versatility in its integration. It can be seamlessly launched via button clicks or any user-triggered action, enhancing the overall user experience and facilitating smoother interactions within the application.
set(OnItemClick:)
is triggered when you click on a ListItem of the Conversations component. This set(OnItemClick:)
method proves beneficial when a user intends to customize the on-click behavior in CometChatCallLogs.
set(OnItemLongClick:)
is triggered when you long press on a ListItem of the Call logs component. This set(OnItemLongClick:)
method proves beneficial when a user intends to additional functionality on long press on list item in CometChatCallLogs.
set(onBack:)
method becomes valuable when a user needs to override the action triggered upon pressing the back button in CometChatCallLogs.
set(onEmpty:)
method is triggered when the call logs list is empty in CometChatCallLogs.
Method | Description | Code |
---|---|---|
fetchPrevious | Fetches previous call logs | fetchPrevious(authToken: String, onSuccess: (([CallLog]) -> Void), onError: (_ error: CometChatCallException?) -> Void) |
fetchNext | Fetches next call logs | fetchNext(onSuccess: (([CallLog]) -> Void), onError: (_ error: CometChatCallException?) -> Void) |
limit | Sets the limit for the call logs request | .set(limit: Int) |
callType | Sets the call type for the call logs request | .set(callType: CallType) |
callStatus | Sets the call status for the call logs request | .set(callStatus: CallStatus) |
hasRecording | Sets the recording status for the call logs request | .set(hasRecording: Bool) |
callDirection | Sets the call direction for the call logs request | .set(callDirection: CallDirection) |
uid | Sets the user ID for the call logs request | .set(uid: String) |
guid | Sets the group ID for the call logs request | .set(guid: String) |
authToken | Sets the auth token for the call logs request | .set(authToken: String?) |
build | Builds the call logs request | .build() |
Component
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
The Call Logs
component does not have any exposed events.
CallLog
Component by applying the CallLogStyle
to it using the following code snippet.
Global level styling
Property | Default Value | Description |
---|---|---|
List Item Styles | ||
listItemTitleTextColor | CometChatTheme.textColorPrimary | Text color for the list item title. |
listItemTitleFont | CometChatTypography.Heading4.medium | Font for the list item title. |
listItemSubTitleTextColor | CometChatTheme.textColorSecondary | Text color for the list item subtitle. |
listItemSubTitleFont | CometChatTypography.Body.regular | Font for the list item subtitle. |
listItemBackground | CometChatTheme.backgroundColor01 | Background color for the list item. |
listItemSelectedBackground | CometChatTheme.backgroundColor01 | Background color for the selected list item. |
listItemBorderWidth | 0 | Border width for the list item. |
listItemBorderColor | CometChatTheme.borderColorLight | Border color for the list item. |
listItemCornerRadius | .init(cornerRadius: 0) | Corner radius for the list item. |
listItemSelectionImageTint | .clear | Tint color for the selection image. |
listItemDeSelectedImageTint | .clear | Tint color for the deselected image. |
listItemSelectedImage | UIImage() | Image for the selected list item. |
listItemDeSelectedImage | UIImage() | Image for the deselected list item. |
Background Styles | ||
backgroundColor | CometChatTheme.backgroundColor01 | Background color. |
borderWidth | 0 | Border width. |
borderColor | CometChatTheme.borderColorLight | Border color. |
cornerRadius | .init(cornerRadius: 0) | Corner radius. |
Title Styles | ||
titleColor | CometChatTheme.textColorPrimary | Text color for the title. |
titleFont | CometChatTypography.Heading4.bold | Font for the title. |
largeTitleColor | CometChatTheme.textColorPrimary | Text color for large titles. |
largeTitleFont | nil | Font for large titles. |
Navigation Bar Styles | ||
navigationBarTintColor | CometChatTheme.backgroundColor01 | Background color for the navigation bar. |
navigationBarItemsTintColor | CometChatTheme.iconColorPrimary | Tint color for navigation bar items. |
Error Message Styles | ||
errorTitleTextFont | CometChatTypography.Heading4.bold | Font for the error title. |
errorTitleTextColor | CometChatTheme.textColorPrimary | Text color for the error title. |
errorSubTitleFont | CometChatTypography.Body.regular | Font for the error subtitle. |
errorSubTitleTextColor | CometChatTheme.textColorSecondary | Text color for the error subtitle. |
Retry Button Styles | ||
retryButtonTextColor | CometChatTheme.white | Text color for the retry button. |
retryButtonTextFont | CometChatTypography.Button.medium | Font for the retry button text. |
retryButtonBackgroundColor | CometChatTheme.primaryColor | Background color for the retry button. |
retryButtonBorderColor | .clear | Border color for the retry button. |
retryButtonBorderWidth | 0 | Border width for the retry button. |
retryButtonCornerRadius | .init(cornerRadius: 0) | Corner radius for the retry button. |
Empty State Styles | ||
emptyTitleTextFont | CometChatTypography.Heading4.bold | Font for the empty state title. |
emptyTitleTextColor | CometChatTheme.textColorPrimary | Text color for the empty state title. |
emptySubTitleFont | CometChatTypography.Body.regular | Font for the empty state subtitle. |
emptySubTitleTextColor | CometChatTheme.textColorSecondary | Text color for the empty state subtitle. |
TableView Styles | ||
tableViewSeparator | .clear | Color for the table view separator. |
Icon Styles | ||
backIcon | nil | Icon for the back button. |
backIconTint | CometChatTheme.iconColorPrimary | Tint color for the back icon. |
incomingCallIcon | System icon for “arrow.down.left” | Icon for incoming calls. |
incomingCallIconTint | CometChatTheme.errorColor | Tint color for the incoming call icon. |
outgoingCallIcon | System icon for “arrow.up.right” | Icon for outgoing calls. |
outgoingCallIconTint | CometChatTheme.successColor | Tint color for the outgoing call icon. |
missedCallTitleColor | CometChatTheme.errorColor | Text color for missed call titles. |
missedCallIcon | nil | Icon for missed calls. |
missedCallIconTint | CometChatTheme.errorColor | Tint color for the missed call icon. |
audioCallIcon | System icon for “phone” | Icon for audio calls. |
audioCallIconTint | CometChatTheme.iconColorPrimary | Tint color for the audio call icon. |
videoCallIcon | System icon for “video” | Icon for video calls. |
videoCallIconTint | CometChatTheme.iconColorPrimary | Tint color for the video call icon. |
separatorColor | .clear | Color for separators. |
Property | Description | Code |
---|---|---|
callRequestBuilder | Sets the CallLogsBuilder instance for call logs. | .set(callRequestBuilder: Any) |
hideError | Hides the error state view. | hideError = true |
hideNavigationBar | Hides the navigation bar. | hideNavigationBar = true |
hideLoadingState | Hides the loading state view. | hideLoadingState = true |
hideBackIcon | Hides the back icon in the navigation bar. | hideBackIcon = true |
Property | Description | Code |
---|---|---|
time | Called to format a timestamp as a standard time (e.g., “12:30 PM”). | CometChatCallLogs.dateTimeFormatter.time = { ... } |
today | Called when rendering messages sent today. | CometChatCallLogs.dateTimeFormatter.today = { ... } |
yesterday | Called for yesterday’s messages. | CometChatCallLogs.dateTimeFormatter.yesterday = { ... } |
lastweek | Called for messages within the last week. | CometChatCallLogs.dateTimeFormatter.lastweek = { ... } |
otherDay | Called for dates older than last week. | CometChatCallLogs.dateTimeFormatter.otherDay = { ... } |
minute | Called when referring to “a minute ago”. | CometChatCallLogs.dateTimeFormatter.minute = { ... } |
minutes | Called for “x minutes ago”. | CometChatCallLogs.dateTimeFormatter.minutes = { ... } |
hour | Called for “an hour ago”. | CometChatCallLogs.dateTimeFormatter.hour = { ... } |
hours | Called for “x hours ago”. | CometChatCallLogs.dateTimeFormatter.hours = { ... } |
CustomListItem
for more complex or unique list items.
Afterwards, seamlessly integrate this CustomListItem
UIView file into the .setListItemView
method within CometChatCallLogs().
CustomTitleView
UIView file into the .set(titleView:)
method within CometChatCallLogs().
CustomLeadingView
UIView file into the .set(leadingView:)
method within CometChatCallLogs().
SubtitleView
for more complex or unique list items.
Afterwards, seamlessly integrate this SubtitleView
UIView file into the .setSubtitle
method within CometChatCallLogs().
CustomTailView
for more complex or unique list items.
Afterwards, seamlessly integrate this CustomTrailView
UIView file into the .set(trailView:)
method within CometChatCallLogs().
CometChatCallLogs
. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.