Class ChannelListConfig
-
- All Implemented Interfaces:
public class ChannelListConfigConfiguration for the channel-list screen.
Obtain the singleton instance via channelListConfig.
-
-
Field Summary
Fields Modifier and Type Field Description public intdelayRefreshTime
-
Constructor Summary
Constructors Constructor Description ChannelListConfig()
-
Method Summary
Modifier and Type Method Description intgetDelayRefreshTime()Returns the refresh delay (ms) after receiving a message. voidsetDelayRefreshTime(int delayRefreshTime)Sets the refresh delay (ms) after receiving a message. voidinitConfig(Context context)Initializes this configuration from Android resource values. voidsetBehaviorListener(ChannelListBehaviorListener listener)Sets the behavior listener for the channel-list screen. voidsetCountPerPage(int count)Sets the number of conversations to load per page. void)>setConversationListProvider(ProviderManager<BaseUiChannel> providerManager)Replaces the provider manager for the channel list. voidsetConversationProvider(ConversationListProvider provider)Adds a conversation list view provider. ProviderManager<BaseUiChannel>getProviderManager()Returns the provider manager for the channel list. booleanisEnableAutomaticDownloadHQVoice()Returns whether high-quality voice messages are downloaded automatically. voidsetEnableAutomaticDownloadHQVoice(boolean enable)Enables or disables automatic download of high-quality voice messages. DataProcessor<BaseChannel>getDataProcessor()Returns the current data processor for the channel list. void)>setDataProcessor(DataProcessor<BaseChannel> dataFilter)Sets the data processor. void)>setDataProcessor(BaseDataProcessor<BaseChannel> dataFilter)Sets a custom data processor for filtering and gathering channels. ChannelListBehaviorListenergetListener()Returns the current behavior listener. booleanisEnableConnectStateNotice()Returns whether the connection-state notification banner is enabled. intgetConversationCountPerPage()Returns the number of conversations loaded per page. booleanisTopPriority()Returns whether top-priority channels always appear first in the list. voidsetTopPriority(boolean topPriority)Sets whether top-priority channels always appear first. -
-
Method Detail
-
getDelayRefreshTime
int getDelayRefreshTime()
Returns the refresh delay (ms) after receiving a message.
-
setDelayRefreshTime
void setDelayRefreshTime(int delayRefreshTime)
Sets the refresh delay (ms) after receiving a message.
- Parameters:
delayRefreshTime- delay in milliseconds
-
initConfig
void initConfig(Context context)
Initializes this configuration from Android resource values.
- Parameters:
context- application or activity context
-
setBehaviorListener
void setBehaviorListener(ChannelListBehaviorListener listener)
Sets the behavior listener for the channel-list screen.
- Parameters:
listener- the listener to register
-
setCountPerPage
void setCountPerPage(int count)
Sets the number of conversations to load per page.
- Parameters:
count- page size
-
setConversationListProvider
void )>setConversationListProvider(ProviderManager<BaseUiChannel> providerManager)
Replaces the provider manager for the channel list.
- Parameters:
providerManager- the provider manager to use
-
setConversationProvider
void setConversationProvider(ConversationListProvider provider)
Adds a conversation list view provider.
- Parameters:
provider- the provider to add
-
getProviderManager
ProviderManager<BaseUiChannel> getProviderManager()
Returns the provider manager for the channel list.
-
isEnableAutomaticDownloadHQVoice
boolean isEnableAutomaticDownloadHQVoice()
Returns whether high-quality voice messages are downloaded automatically.
-
setEnableAutomaticDownloadHQVoice
void setEnableAutomaticDownloadHQVoice(boolean enable)
Enables or disables automatic download of high-quality voice messages.
- Parameters:
enable-trueto enable
-
getDataProcessor
DataProcessor<BaseChannel> getDataProcessor()
Returns the current data processor for the channel list.
-
setDataProcessor
@Deprecated() void )>setDataProcessor(DataProcessor<BaseChannel> dataFilter)
Sets the data processor.
- Parameters:
dataFilter- the data processor
-
setDataProcessor
void )>setDataProcessor(BaseDataProcessor<BaseChannel> dataFilter)
Sets a custom data processor for filtering and gathering channels.
- Parameters:
dataFilter- the processor to use
-
getListener
ChannelListBehaviorListener getListener()
Returns the current behavior listener.
-
isEnableConnectStateNotice
boolean isEnableConnectStateNotice()
Returns whether the connection-state notification banner is enabled.
-
getConversationCountPerPage
int getConversationCountPerPage()
Returns the number of conversations loaded per page.
-
isTopPriority
boolean isTopPriority()
Returns whether top-priority channels always appear first in the list.
-
setTopPriority
void setTopPriority(boolean topPriority)
Sets whether top-priority channels always appear first.
- Parameters:
topPriority-trueto enable top-priority ordering
-
-
-
-