-
public interface GlobalStateGlobal state of OfflinePlugin.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanisOnline()If the user is online or not. abstract BooleanisOffline()If the user is offline or not. abstract BooleanisConnecting()If connection is in connecting state. abstract BooleanisInitialized()If domain state is initialized or not. abstract StateFlow<User>getUser()The current user in the OfflinePlugin state. abstract StateFlow<Boolean>getInitialized()If the client connection has been initialized. abstract StateFlow<ConnectionState>getConnectionState()StateFlow<ConnectionState> that indicates if we are currently online, connecting of offline. 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<Event<ChatError>>getErrorEvents()The error event state flow object is triggered when errors in the underlying components occur. 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<Boolean>getBanned()if the current user is banned or not. abstract StateFlow<TypingEvent>getTypingUpdates()Updates about currently typing users in active channels. -
-
Method Detail
-
isConnecting
abstract Boolean isConnecting()
If connection is in connecting state.
-
isInitialized
abstract Boolean isInitialized()
If domain state is initialized or not.
-
getUser
abstract StateFlow<User> getUser()
The current user in the OfflinePlugin state.
-
getInitialized
abstract StateFlow<Boolean> getInitialized()
If the client connection has been initialized.
-
getConnectionState
abstract StateFlow<ConnectionState> getConnectionState()
StateFlow<ConnectionState> that indicates if we are currently online, connecting of offline.
-
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.
-
getErrorEvents
abstract StateFlow<Event<ChatError>> getErrorEvents()
The error event state flow object is triggered when errors in the underlying components occur. The following example shows how to observe these errors
repo.errorEvent.collect { // create a toast }
-
getChannelMutes
abstract StateFlow<List<ChannelMute>> getChannelMutes()
List of channels you've muted.
-
getTypingUpdates
abstract StateFlow<TypingEvent> getTypingUpdates()
Updates about currently typing users in active channels. See TypingEvent.
-
-
-
-