-
public interface ChannelStateState container with reactive data of a channel.
-
-
Method Summary
Modifier and Type Method Description abstract ChanneltoChannel()Function that builds a channel based on data from StateFlows. abstract MessagegetMessageById(String id)Gets message using the ID. abstract StringgetChannelType()Type of this channel. abstract StringgetChannelId()Id of this channel. abstract StringgetCid()CID of this channel. abstract StateFlow<Message>getRepliedMessage()A replied message state in this channel. abstract StateFlow<Map<String, List<String>>>getQuotedMessagesMap()A map containing all the ids that quoted a message. abstract StateFlow<List<Message>>getMessages()The message collection of this channel. abstract StateFlow<List<Message>>getPinnedMessages()The pinned message collection of this channel. abstract StateFlow<MessagesState>getMessagesState()Strong typed state of message collection of this channel. 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<Integer>getMembersCount()Number of all 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 the channel is 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 BooleangetRecoveryNeeded()If we need to recover state when connection established again. abstract StateFlow<Config>getChannelConfig()Channel config data abstract StateFlow<Boolean>getInsideSearch()If the channel is currently showing messages around a specific message (e.g., from a deep link or search). abstract StateFlow<Date>getLastSentMessageDate()The date of the last message sent by the current user. abstract StateFlow<List<Location>>getActiveLiveLocations()Live locations that are currently active in this channel. abstract StateFlow<Integer>getMessageCount()Number of messages in the channel. -
-
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 performant way to request one message than request the whole list of messages
-
getChannelType
abstract String getChannelType()
Type of this channel.
-
getChannelId
abstract String getChannelId()
Id of this channel.
-
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.
-
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.
-
getMembersCount
abstract StateFlow<Integer> getMembersCount()
Number of all members of this channel.
-
getChannelData
abstract StateFlow<ChannelData> getChannelData()
StateFlow object with the channel data.
-
getLoading
abstract StateFlow<Boolean> getLoading()
If the channel is loading. True while the channel loads for the first time, before any data from the local database or the API arrived, and while older or newer messages load. With io.getstream.chat.android.client.api.ChatClientConfig.useLegacyChannelLogic enabled, only the first load is reported.
-
getLoadingOlderMessages
abstract StateFlow<Boolean> getLoadingOlderMessages()
If we are currently loading older messages.
-
getLoadingNewerMessages
abstract StateFlow<Boolean> getLoadingNewerMessages()
If we are currently loading newer messages.
-
getEndOfOlderMessages
abstract StateFlow<Boolean> getEndOfOlderMessages()
If there are no more older messages to load.
-
getEndOfNewerMessages
abstract StateFlow<Boolean> getEndOfNewerMessages()
If there are no more newer messages to load.
-
getRecoveryNeeded
abstract Boolean getRecoveryNeeded()
If we need to recover state when connection established again.
-
getChannelConfig
abstract StateFlow<Config> getChannelConfig()
Channel config data
-
getInsideSearch
abstract StateFlow<Boolean> getInsideSearch()
If the channel is currently showing messages around a specific message (e.g., from a deep link or search).
-
getLastSentMessageDate
abstract StateFlow<Date> getLastSentMessageDate()
The date of the last message sent by the current user.
-
getActiveLiveLocations
abstract StateFlow<List<Location>> getActiveLiveLocations()
Live locations that are currently active in this channel.
-
getMessageCount
abstract StateFlow<Integer> getMessageCount()
Number of messages in the channel.
-
-
-
-