Class ChannelListDataHandler

  • All Implemented Interfaces:
    ai.nexconn.chatui.base.interfaces.OnPagedDataLoader

    
    public class ChannelListDataHandler
    extends MultiDataHandler implements OnPagedDataLoader
                        

    Core data handler for the channel list

    Responsible for channel data fetching, filtering, sorting, deduplication, and UI model management. Implements OnPagedDataLoader to support load-more pagination.

    Data loading has two paths:

    • refresh — initial load or event-driven refresh, resets pagination (auto-coalesces rapid calls)
    • loadNext — paginated load-more
    Since:

    5.10.4

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void refresh() Refreshes the channel list.
      void refresh(long delayMs) Refreshes the channel list with a custom delay.
      void doUpdate(List<BaseChannel> channels)
      void updateByChannel(BaseChannel channel) Updates a single channel (from event callback)
      BaseUiChannel findConversationFromList(ChannelType type, String channelId)
      void refreshConversationList()
      boolean isSupported(ChannelType type)
      void loadNext(OnDataChangeListener<Boolean> listener) Loads the next page of data.
      boolean hasNext() Returns whether there is a next page.
      void stop() Stops the handler.
      • Methods inherited from class ai.nexconn.chatui.base.BaseHandler

        isAlive
      • Methods inherited from class ai.nexconn.chatui.base.MultiDataHandler

        addDataChangeListener, notifyDataChange, notifyDataError, notifyDataError, replaceDataChangeListener
      • Methods inherited from class ai.nexconn.chatui.base.interfaces.OnPagedDataLoader

        hasPrevious, loadPrevious
      • Methods inherited from class java.lang.Object

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

      • ChannelListDataHandler

        ChannelListDataHandler(Context applicationContext)
    • Method Detail

      • refresh

         void refresh()

        Refreshes the channel list. Rapid successive calls are auto-coalesced.

      • refresh

         void refresh(long delayMs)

        Refreshes the channel list with a custom delay.

        If delay is non-positive, falls back to the default coalescing window.

      • updateByChannel

         void updateByChannel(BaseChannel channel)

        Updates a single channel (from event callback)

      • hasNext

         boolean hasNext()

        Returns whether there is a next page.

        Returns:

        true if more data is available

      • stop

         void stop()

        Stops the handler.