Class AppSettingsHandler

  • All Implemented Interfaces:

    
    public class AppSettingsHandler
    
                        

    Application settings handler — process-wide singleton.

    Manages fetching, caching, and refreshing ai.nexconn.chat.model.AppSettings, including:

    • Listening for connection-status changes and auto-refreshing settings on reconnect
    • Caching the latest AppSettings in memory
    • Providing accessors for individual feature flags
    Since:

    5.28.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public AppSettings appSettings
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      AppSettings getAppSettings() Returns the cached application settings.
      static AppSettingsHandler getInstance() Returns the process-wide singleton instance.
      boolean hasInit() Returns whether AppSettings has been successfully fetched at least once.
      boolean isReadReceiptV5Enabled(ChannelType type) Returns whether read receipts (V5) are enabled for the given channel type.
      boolean isOnlineStatusEnable() Returns whether the online-status feature is enabled (affects UI visibility).
      boolean isFriendOnlineStatusSubscribeEnable() Returns whether friend online-status subscription is enabled.
      boolean isOnlineStatusSubscribeEnable() Returns whether general online-status subscription is enabled.
      boolean isUserProfileEnabled() Returns whether user-profile hosting is enabled.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getAppSettings

         AppSettings getAppSettings()

        Returns the cached application settings.

        Returns:

        the current ai.nexconn.chat.model.AppSettings

      • hasInit

         boolean hasInit()

        Returns whether AppSettings has been successfully fetched at least once.

        Returns:

        true after the first successful fetch; false otherwise

      • isReadReceiptV5Enabled

         boolean isReadReceiptV5Enabled(ChannelType type)

        Returns whether read receipts (V5) are enabled for the given channel type.

        Read receipts are only supported for DIRECT and GROUP, and only when the Kit-level read-receipt toggle is on and the channel type is in the supported set.

        Parameters:
        type - channel type to check
        Returns:

        true if V5 read receipts are enabled; false otherwise

      • isOnlineStatusEnable

         boolean isOnlineStatusEnable()

        Returns whether the online-status feature is enabled (affects UI visibility).

        Returns true when the Kit feature flag is on AND at least one of friend-online-status or general online-status subscription is enabled.

        Returns:

        true if online status should be shown in the UI

      • isUserProfileEnabled

         boolean isUserProfileEnabled()

        Returns whether user-profile hosting is enabled.

        Returns:

        false