Package 

Interface GlobalState

    • Method Summary

      Modifier and Type Method Description
      abstract Boolean isOnline() If the user is online or not.
      abstract Boolean isOffline() If the user is offline or not.
      abstract Boolean isConnecting() If connection is in connecting state.
      abstract Boolean isInitialized() 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

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

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

      • getMuted

         abstract StateFlow<List<Mute>> getMuted()

        list of users that you've muted.

      • getChannelMutes

         abstract StateFlow<List<ChannelMute>> getChannelMutes()

        List of channels you've muted.

      • getBanned

         abstract StateFlow<Boolean> getBanned()

        if the current user is banned or not.

      • getTypingUpdates

         abstract StateFlow<TypingEvent> getTypingUpdates()

        Updates about currently typing users in active channels. See TypingEvent.