GlobalState

interface GlobalState

Global state of StatePlugin.

Properties

Link copied to clipboard
abstract val activeLiveLocations: StateFlow<List<Location>>

Active live locations that are being shared in the app.

Link copied to clipboard
abstract val banned: StateFlow<Boolean>

if the current user is banned or not.

Link copied to clipboard
abstract val blockedUserIds: StateFlow<List<String>>

List of users that you've blocked.

Link copied to clipboard
abstract val channelDraftMessages: StateFlow<Map<String, DraftMessage>>

Map of draft messages for all channels. Use Channel.cid to access draft message for a particular channel.

Link copied to clipboard
abstract val channelMutes: StateFlow<List<ChannelMute>>

List of channels you've muted.

Link copied to clipboard
abstract val channelUnreadCount: StateFlow<Int>

the number of unread channels for the current user.

Link copied to clipboard
abstract val currentUserActiveLiveLocations: StateFlow<List<Location>>

Active live locations that are being shared in the app by the current user.

Link copied to clipboard
abstract val groupedUnreadChannels: StateFlow<Map<String, Int>>

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.

Link copied to clipboard
abstract val muted: StateFlow<List<Mute>>

list of users that you've muted.

Link copied to clipboard
abstract val threadDraftMessages: StateFlow<Map<String, DraftMessage>>

Map of draft messages for all threads. Use the parentId to access draft message for a particular thread.

Link copied to clipboard
abstract val totalUnreadCount: StateFlow<Int>

The total unread message count for the current user. Depending on your app you'll want to show this or the channelUnreadCount.

Link copied to clipboard
abstract val typingChannels: StateFlow<Map<String, TypingEvent>>

Map of typing users in all active channel. Use Channel.cid to access events for a particular channel.

Link copied to clipboard
abstract val unreadThreadsCount: StateFlow<Int>

The number of unread threads for the current user.