Class ChannelListConfig

  • All Implemented Interfaces:

    
    public class ChannelListConfig
    
                        

    Configuration for the channel-list screen.

    Obtain the singleton instance via channelListConfig.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public int delayRefreshTime
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getDelayRefreshTime() Returns the refresh delay (ms) after receiving a message.
      void setDelayRefreshTime(int delayRefreshTime) Sets the refresh delay (ms) after receiving a message.
      void initConfig(Context context) Initializes this configuration from Android resource values.
      void setBehaviorListener(ChannelListBehaviorListener listener) Sets the behavior listener for the channel-list screen.
      void setCountPerPage(int count) Sets the number of conversations to load per page.
      void )>setConversationListProvider(ProviderManager<BaseUiChannel> providerManager) Replaces the provider manager for the channel list.
      void setConversationProvider(ConversationListProvider provider) Adds a conversation list view provider.
      ProviderManager<BaseUiChannel> getProviderManager() Returns the provider manager for the channel list.
      boolean isEnableAutomaticDownloadHQVoice() Returns whether high-quality voice messages are downloaded automatically.
      void setEnableAutomaticDownloadHQVoice(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.
      ChannelListBehaviorListener getListener() Returns the current behavior listener.
      boolean isEnableConnectStateNotice() Returns whether the connection-state notification banner is enabled.
      int getConversationCountPerPage() Returns the number of conversations loaded per page.
      boolean isTopPriority() Returns whether top-priority channels always appear first in the list.
      void setTopPriority(boolean topPriority) Sets whether top-priority channels always appear first.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChannelListConfig

        ChannelListConfig()
    • 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.

      • setEnableAutomaticDownloadHQVoice

         void setEnableAutomaticDownloadHQVoice(boolean enable)

        Enables or disables automatic download of high-quality voice messages.

        Parameters:
        enable - true to 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.

      • 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 - true to enable top-priority ordering