Class AppSettingsHandler
-
- All Implemented Interfaces:
public class AppSettingsHandlerApplication 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
AppSettingsin memory - Providing accessors for individual feature flags
- Since:
5.28.0
-
-
Field Summary
Fields Modifier and Type Field Description public AppSettingsappSettings
-
Method Summary
Modifier and Type Method Description AppSettingsgetAppSettings()Returns the cached application settings. static AppSettingsHandlergetInstance()Returns the process-wide singleton instance. booleanhasInit()Returns whether AppSettingshas been successfully fetched at least once.booleanisReadReceiptV5Enabled(ChannelType type)Returns whether read receipts (V5) are enabled for the given channel type. booleanisOnlineStatusEnable()Returns whether the online-status feature is enabled (affects UI visibility). booleanisFriendOnlineStatusSubscribeEnable()Returns whether friend online-status subscription is enabled. booleanisOnlineStatusSubscribeEnable()Returns whether general online-status subscription is enabled. booleanisUserProfileEnabled()Returns whether user-profile hosting is enabled. -
-
Method Detail
-
getAppSettings
AppSettings getAppSettings()
Returns the cached application settings.
- Returns:
the current ai.nexconn.chat.model.AppSettings
-
getInstance
static AppSettingsHandler getInstance()
Returns the process-wide singleton instance.
- Returns:
the AppSettingsHandler singleton
-
hasInit
boolean hasInit()
Returns whether
AppSettingshas been successfully fetched at least once.- Returns:
trueafter the first successful fetch;falseotherwise
-
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:
trueif V5 read receipts are enabled;falseotherwise
-
isOnlineStatusEnable
boolean isOnlineStatusEnable()
Returns whether the online-status feature is enabled (affects UI visibility).
Returns
truewhen the Kit feature flag is on AND at least one of friend-online-status or general online-status subscription is enabled.- Returns:
trueif online status should be shown in the UI
-
isFriendOnlineStatusSubscribeEnable
boolean isFriendOnlineStatusSubscribeEnable()
Returns whether friend online-status subscription is enabled.
-
isOnlineStatusSubscribeEnable
boolean isOnlineStatusSubscribeEnable()
Returns whether general online-status subscription is enabled.
-
isUserProfileEnabled
boolean isUserProfileEnabled()
Returns whether user-profile hosting is enabled.
- Returns:
false
-
-
-
-