ChannelConfig

public class ChannelConfig

Configuration for the conversation (channel) screen.

Obtain the singleton instance via channelConfig.

Properties

Link copied to clipboard
Link copied to clipboard
public static boolean enableMultiDeviceSync
Enables multi-device unread count sync (direct and group channels only).
Link copied to clipboard
Link copied to clipboard
public boolean rc_enable_recall_message
Link copied to clipboard
public boolean rc_enable_resend_message
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public boolean rc_play_audio_continuous

Functions

Link copied to clipboard
public void addMessageProvider(IMessageProvider provider)
Link copied to clipboard
public void addMoreClickAction(int index, IClickActions action)
Inserts a click action at the specified position in the "more" actions list.
Link copied to clipboard
public void addViewProcessor(IChannelUIRenderer processor)
Adds a UI renderer to the channel fragment.
Link copied to clipboard
public ChannelClickListener getChannelClickListener()
Returns the current channel click listener.
Link copied to clipboard
public ChannelLoadMessageType getChannelLoadMessageType()
Returns the current remote-message loading strategy.
Link copied to clipboard
Returns the maximum number of history messages to show in the channel screen.
Link copied to clipboard
Returns the maximum number of messages to fetch from the remote server.
Link copied to clipboard
Returns the maximum number of unread messages to display.
Link copied to clipboard
public HashMap<String, Integer> getFileSuffixTypes()
Internal use only.
Link copied to clipboard
public ProviderManager<UiMessage> getMessageListProvider()
Link copied to clipboard
public Spannable getMessageSummary(Context context, BaseChannel channel)
Returns the display summary spannable for a channel's latest message.
public Spannable getMessageSummary(Context context, MessageContent messageContent)
Returns the display summary spannable for a message content.
Link copied to clipboard
public List<IClickActions> getMoreClickActions()
Returns the list of actions shown in the bottom panel when "more" is tapped after long-pressing a message.
Link copied to clipboard
public Set<ChannelType> getSupportReadReceiptConversationType()
Returns the set of channel types that support read receipts.
Link copied to clipboard
public IChannelViewModelProcessor getViewModelProcessor()
Returns the custom ViewModel processor, or null if not set.
Link copied to clipboard
public List<IChannelUIRenderer> getViewProcessors()
Link copied to clipboard
public void initConfig(Context context)
Initializes this configuration from Android resource values.
Link copied to clipboard
public boolean isEnableMultiDeviceSync(ChannelType type)
Returns whether multi-device read status sync is enabled.
Link copied to clipboard
public boolean isEnableReadReceipt()
Returns whether read receipts are enabled.
Link copied to clipboard
public boolean isNeedDeleteRemoteMessage()
Returns whether remote messages are also deleted on long-press delete.
Link copied to clipboard
Returns whether to refresh the list when it becomes empty after deleting messages.
Link copied to clipboard
public boolean isShowHistoryDividerMessage()
Link copied to clipboard
public boolean isShowHistoryMessageBar(ChannelType type)
Returns whether to show the history unread message bubble (direct and group channels only).
Link copied to clipboard
public boolean isShowMoreClickAction()
Link copied to clipboard
public boolean isShowNewMentionMessageBar(ChannelType type)
Returns whether to show the unread @mention count badge (group channels only).
Link copied to clipboard
public boolean isShowNewMessageBar(ChannelType type)
Returns whether to show the new-message unread bubble (direct and group channels only).
Link copied to clipboard
public boolean isShowReadReceipt(ChannelType type)
Returns whether to show the read receipt indicator (direct channels only).
Link copied to clipboard
public boolean isShowReadReceiptRequest(ChannelType type)
Returns whether to show the read receipt request indicator (group channels only).
Link copied to clipboard
public boolean isShowReceiverUserTitle(ChannelType type)
Returns whether to show the receiver user title for the given channel type.
Link copied to clipboard
public void registerFileSuffixTypes(HashMap<String, Integer> map)
Registers icon resource mappings for file message suffixes.
Link copied to clipboard
public void removeMoreClickAction(IClickActions action)
Removes a click action from the "more" actions list.
Link copied to clipboard
public void replaceMessageProvider(Class oldProviderClass, IMessageProvider provider)
Replaces an existing message item provider with a new one.
Link copied to clipboard
public void setChannelClickListener(ChannelClickListener conversationClickListener)
Sets the click event listener for the channel screen.
Link copied to clipboard
public void setChannelLoadMessageType(ChannelLoadMessageType conversationLoadMessageType)
Sets the strategy for loading remote messages when entering a channel.
Link copied to clipboard
public void setConversationHistoryMessageCount(int conversationHistoryMessageCount)
Sets the maximum number of history messages to show in the channel screen.
Link copied to clipboard
public void setConversationRemoteMessageCount(int conversationRemoteMessageCount)
Sets the maximum number of messages to fetch from the remote server.
Link copied to clipboard
public void setConversationShowUnreadMessageCount(int conversationShowUnreadMessageCount)
Sets the maximum number of unread messages to display.
Link copied to clipboard
public void setEnableMultiDeviceSync(boolean enableMultiDeviceSync)
Enables or disables multi-device unread count sync.
Link copied to clipboard
public void setEnableReadReceipt(boolean enable)
Enables or disables read receipts (direct and group channels only).
Link copied to clipboard
public void setNeedDeleteRemoteMessage(boolean needDeleteRemoteMessage)
Sets whether remote messages are also deleted on long-press delete.
Link copied to clipboard
public void setNeedRefreshWhenListIsEmptyAfterDelete(boolean needRefreshWhenListIsEmptyAfterDelete)
Sets whether to refresh the list when it becomes empty after deleting messages.
Link copied to clipboard
public void setShowHistoryDividerMessage(boolean showHistoryDividerMessage)
Link copied to clipboard
public void setShowHistoryMessageBar(boolean showHistoryMessageBar)
Link copied to clipboard
public void setShowMoreClickAction(boolean showMoreClickAction)
Link copied to clipboard
public void setShowNewMentionMessageBar(boolean showNewMentionMessageBar)
Link copied to clipboard
public void setShowNewMessageBar(boolean showNewMessageBar)
Link copied to clipboard
public void setShowReceiverUserTitle(boolean showReceiverUserTitle)
Link copied to clipboard
public void setSupportReadReceiptConversationType(Array<ChannelType> types)
Sets the channel types that support read receipts.
Link copied to clipboard
public void setViewModelProcessor(IChannelViewModelProcessor viewModelProcessor)
Sets a custom ViewModel processor to extend channel screen business logic.
Link copied to clipboard
public boolean showSummaryWithName(MessageContent messageContent)
Returns whether to show the sender name alongside the message summary.