Package 

Interface ChannelState


  • 
    public interface ChannelState
    
                        

    State container with reactive data of a channel.

    • Method Summary

      Modifier and Type Method Description
      abstract Channel toChannel() Function that builds a channel based on data from StateFlows.
      abstract String getChannelType() Type of this channel.
      abstract String getChannelId() Id of this channel.
      abstract String getCid() CID of this channel.
      abstract StateFlow<Message> getRepliedMessage() A replied message state in this channel.
      abstract StateFlow<List<Message>> getMessages() The message collection of this channel.
      abstract StateFlow<MessagesState> getMessagesState() Strong typed state of message collection of this channel.
      abstract StateFlow<List<Message>> getOldMessages() The collection of messages from previous pages of data.
      abstract StateFlow<Integer> getWatcherCount() The number of people currently watching the channel.
      abstract StateFlow<List<User>> getWatchers() The list of users currently watching this channel.
      abstract StateFlow<TypingEvent> getTyping() Who is currently typing.
      abstract StateFlow<List<ChannelUserRead>> getReads() How far every user in this channel has read.
      abstract StateFlow<ChannelUserRead> getRead() Read status for the current user.
      abstract StateFlow<Integer> getUnreadCount() Unread count for this channel, calculated based on read state.
      abstract StateFlow<List<Member>> getMembers() The list of members of this channel.
      abstract StateFlow<ChannelData> getChannelData() StateFlow object with the channel data.
      abstract StateFlow<Boolean> getHidden() If the channel is currently hidden.
      abstract StateFlow<Boolean> getMuted() If the channel is currently muted.
      abstract StateFlow<Boolean> getLoading() If we are currently loading.
      abstract StateFlow<Boolean> getLoadingOlderMessages() If we are currently loading older messages.
      abstract StateFlow<Boolean> getLoadingNewerMessages() If we are currently loading newer messages.
      abstract StateFlow<Boolean> getEndOfOlderMessages() If there are no more older messages to load.
      abstract StateFlow<Boolean> getEndOfNewerMessages() If there are no more newer messages to load.
      abstract Boolean getRecoveryNeeded() If we need to recover state when connection established again.
      • Methods inherited from class java.lang.Object

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

      • toChannel

         abstract Channel toChannel()

        Function that builds a channel based on data from StateFlows.

      • getCid

         abstract String getCid()

        CID of this channel. It's 'channelType:channelId'.

      • getRepliedMessage

         abstract StateFlow<Message> getRepliedMessage()

        A replied message state in this channel. By default is null. There is a value if you're replying some message.

      • getMessages

         abstract StateFlow<List<Message>> getMessages()

        The message collection of this channel.

      • getOldMessages

         abstract StateFlow<List<Message>> getOldMessages()

        The collection of messages from previous pages of data.

      • getWatcherCount

         abstract StateFlow<Integer> getWatcherCount()

        The number of people currently watching the channel.

      • getWatchers

         abstract StateFlow<List<User>> getWatchers()

        The list of users currently watching this channel.

      • getTyping

         abstract StateFlow<TypingEvent> getTyping()

        Who is currently typing. Current user is excluded from this.

      • getReads

         abstract StateFlow<List<ChannelUserRead>> getReads()

        How far every user in this channel has read.

      • getRead

         abstract StateFlow<ChannelUserRead> getRead()

        Read status for the current user.

      • getUnreadCount

         abstract StateFlow<Integer> getUnreadCount()

        Unread count for this channel, calculated based on read state. This works even if you're offline.

      • getMembers

         abstract StateFlow<List<Member>> getMembers()

        The list of members of this channel.

      • getHidden

         abstract StateFlow<Boolean> getHidden()

        If the channel is currently hidden.

      • getMuted

         abstract StateFlow<Boolean> getMuted()

        If the channel is currently muted.