-
public interface GlobalStateGlobal state of StatePlugin.
-
-
Method Summary
Modifier and Type Method Description abstract StateFlow<Integer>getTotalUnreadCount()The total unread message count for the current user. abstract StateFlow<Integer>getChannelUnreadCount()the number of unread channels for the current user. abstract StateFlow<Map<String, Integer>>getGroupedUnreadChannels()Per-group unread channel counts for the current user. abstract StateFlow<Integer>getUnreadThreadsCount()The number of unread threads for the current user. abstract StateFlow<List<Mute>>getMuted()list of users that you've muted. abstract StateFlow<List<ChannelMute>>getChannelMutes()List of channels you've muted. abstract StateFlow<List<String>>getBlockedUserIds()List of users that you've blocked. abstract StateFlow<Boolean>getBanned()if the current user is banned or not. abstract StateFlow<Map<String, TypingEvent>>getTypingChannels()Map of typing users in all active channel. abstract StateFlow<Map<String, DraftMessage>>getChannelDraftMessages()Map of draft messages for all channels. abstract StateFlow<Map<String, DraftMessage>>getThreadDraftMessages()Map of draft messages for all threads. abstract StateFlow<List<Location>>getActiveLiveLocations()Active live locations that are being shared in the app. abstract StateFlow<List<Location>>getCurrentUserActiveLiveLocations()Active live locations that are being shared in the app by the current user. -
-
Method Detail
-
getTotalUnreadCount
abstract StateFlow<Integer> getTotalUnreadCount()
The total unread message count for the current user. Depending on your app you'll want to show this or the channelUnreadCount.
-
getChannelUnreadCount
abstract StateFlow<Integer> getChannelUnreadCount()
the number of unread channels for the current user.
-
getGroupedUnreadChannels
abstract StateFlow<Map<String, Integer>> getGroupedUnreadChannels()
Per-group unread channel counts for the current user. The map keys are group identifiers provided by the backend (e.g. "direct", "support") and values are unread channel counts. Empty map when no grouped counts are available.
-
getUnreadThreadsCount
abstract StateFlow<Integer> getUnreadThreadsCount()
The number of unread threads for the current user.
-
getChannelMutes
abstract StateFlow<List<ChannelMute>> getChannelMutes()
List of channels you've muted.
-
getBlockedUserIds
abstract StateFlow<List<String>> getBlockedUserIds()
List of users that you've blocked.
-
getTypingChannels
abstract StateFlow<Map<String, TypingEvent>> getTypingChannels()
Map of typing users in all active channel. Use Channel.cid to access events for a particular channel.
-
getChannelDraftMessages
abstract StateFlow<Map<String, DraftMessage>> getChannelDraftMessages()
Map of draft messages for all channels. Use Channel.cid to access draft message for a particular channel.
-
getThreadDraftMessages
abstract StateFlow<Map<String, DraftMessage>> getThreadDraftMessages()
Map of draft messages for all threads. Use the parentId to access draft message for a particular thread.
-
getActiveLiveLocations
abstract StateFlow<List<Location>> getActiveLiveLocations()
Active live locations that are being shared in the app.
-
getCurrentUserActiveLiveLocations
abstract StateFlow<List<Location>> getCurrentUserActiveLiveLocations()
Active live locations that are being shared in the app by the current user.
-
-
-
-