some updates
This commit is contained in:
@@ -191,7 +191,7 @@ object AppSettings {
|
||||
var enableHaptic: Boolean
|
||||
get() = get(
|
||||
SettingsKeys.KEY_DEBUG_ENABLE_HAPTIC,
|
||||
true
|
||||
SettingsKeys.DEFAULT_DEBUG_ENABLE_HAPTIC
|
||||
)
|
||||
set(value) = put(SettingsKeys.KEY_DEBUG_ENABLE_HAPTIC, value)
|
||||
|
||||
@@ -202,6 +202,13 @@ object AppSettings {
|
||||
).let(LogLevel::parse)
|
||||
set(level) = put(SettingsKeys.KEY_DEBUG_NETWORK_LOG_LEVEL, level.value)
|
||||
|
||||
var useSystemFont: Boolean
|
||||
get() = get(
|
||||
SettingsKeys.KEY_DEBUG_USE_SYSTEM_FONT,
|
||||
SettingsKeys.DEFAULT_DEBUG_USE_SYSTEM_FONT
|
||||
)
|
||||
set(value) = put(SettingsKeys.KEY_DEBUG_USE_SYSTEM_FONT, value)
|
||||
|
||||
var showDebugCategory: Boolean
|
||||
get() = get(
|
||||
SettingsKeys.KEY_SHOW_DEBUG_CATEGORY,
|
||||
|
||||
@@ -46,8 +46,11 @@ object SettingsKeys {
|
||||
const val KEY_DEBUG_HIDE_DEBUG_LIST = "debug_hide_debug_list"
|
||||
const val KEY_ENABLE_ANIMATIONS_IN_MESSAGES = "debug_enable_animations_in_messages"
|
||||
const val KEY_DEBUG_ENABLE_HAPTIC = "debug_enable_haptic"
|
||||
const val DEFAULT_DEBUG_ENABLE_HAPTIC = true
|
||||
const val KEY_DEBUG_NETWORK_LOG_LEVEL = "debug_network_log_level"
|
||||
const val DEFAULT_NETWORK_LOG_LEVEL = 0
|
||||
const val KEY_DEBUG_USE_SYSTEM_FONT = "debug_use_system_font"
|
||||
const val DEFAULT_DEBUG_USE_SYSTEM_FONT = false
|
||||
|
||||
const val KEY_SHOW_DEBUG_CATEGORY = "show_debug_category"
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ interface UserSettings {
|
||||
val useBlur: StateFlow<Boolean>
|
||||
val showEmojiButton: StateFlow<Boolean>
|
||||
val showTimeInActionMessages: StateFlow<Boolean>
|
||||
val useSystemFont: StateFlow<Boolean>
|
||||
val showDebugCategory: StateFlow<Boolean>
|
||||
|
||||
fun onUseContactNamesChanged(use: Boolean)
|
||||
@@ -44,6 +45,7 @@ interface UserSettings {
|
||||
fun onUseBlurChanged(use: Boolean)
|
||||
fun onShowEmojiButtonChanged(show: Boolean)
|
||||
fun onShowTimeInActionMessagesChanged(show: Boolean)
|
||||
fun onUseSystemFontChanged(use: Boolean)
|
||||
fun onShowDebugCategoryChanged(show: Boolean)
|
||||
}
|
||||
|
||||
@@ -68,6 +70,7 @@ class UserSettingsImpl : UserSettings {
|
||||
override val showEmojiButton = MutableStateFlow(AppSettings.Debug.showEmojiButton)
|
||||
override val showTimeInActionMessages =
|
||||
MutableStateFlow(AppSettings.Debug.showTimeInActionMessages)
|
||||
override val useSystemFont = MutableStateFlow(AppSettings.Debug.useSystemFont)
|
||||
override val showDebugCategory = MutableStateFlow(AppSettings.Debug.showDebugCategory)
|
||||
|
||||
override fun onUseContactNamesChanged(use: Boolean) {
|
||||
@@ -126,6 +129,10 @@ class UserSettingsImpl : UserSettings {
|
||||
showTimeInActionMessages.value = show
|
||||
}
|
||||
|
||||
override fun onUseSystemFontChanged(use: Boolean) {
|
||||
useSystemFont.value = use
|
||||
}
|
||||
|
||||
override fun onShowDebugCategoryChanged(show: Boolean) {
|
||||
showDebugCategory.value = show
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user