Interface ChannelState

  • All Implemented Interfaces:

    
    public interface ChannelState
    
                        

    State container with reactive data of a channel.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • toChannel

         abstract Channel toChannel()

        Function that builds a channel based on data from StateFlows.

      • getMessageById

         abstract Message getMessageById(String id)

        Gets message using the ID. This is a more performatic way to request one message than request the whole list of messages

      • 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.

      • getQuotedMessagesMap

         abstract StateFlow<Map<String, List<String>>> getQuotedMessagesMap()

        A map containing all the ids that quoted a message. Using the id of a message you can get the IDs of the messages that quoted it. This can be used to reflected changes of the original message to the messages that quoted it.

      • getMessages

         abstract StateFlow<List<Message>> getMessages()

        The message collection of this channel.

      • getPinnedMessages

         abstract StateFlow<List<Message>> getPinnedMessages()

        The pinned message collection of this channel.

      • getMessagesState

         abstract StateFlow<MessagesState> getMessagesState()

        Strong typed state of message collection of this channel. See MessagesState for more details.

      • 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.

      • getChannelData

         abstract StateFlow<ChannelData> getChannelData()

        StateFlow object with the channel data.

      • getHidden

         abstract StateFlow<Boolean> getHidden()

        If the channel is currently hidden.

      • getMuted

         abstract StateFlow<Boolean> getMuted()

        If the channel is currently muted.

      • getChannelConfig

         abstract StateFlow<Config> getChannelConfig()

        Channel config data

      • getActiveLiveLocations

         abstract StateFlow<List<Location>> getActiveLiveLocations()

        Live locations that are currently active in this channel.