Loading core/preference/api/src/commonMain/kotlin/net/thunderbird/core/preference/GeneralSettings.kt +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ data class GeneralSettings( val isChangeContactNameColor: Boolean, val isColorizeMissingContactPictures: Boolean, val isUseBackgroundAsUnreadIndicator: Boolean, val isShowComposeButtonOnMessageList: Boolean, ) enum class BackgroundSync { Loading core/preference/api/src/commonMain/kotlin/net/thunderbird/core/preference/GeneralSettingsManager.kt +1 −0 Original line number Diff line number Diff line Loading @@ -28,4 +28,5 @@ interface GeneralSettingsManager { fun setIsChangeContactNameColor(isChangeContactNameColor: Boolean) fun setIsColorizeMissingContactPictures(isColorizeMissingContactPictures: Boolean) fun setIsUseBackgroundAsUnreadIndicator(isUseBackgroundAsUnreadIndicator: Boolean) fun setIsShowComposeButtonOnMessageList(isShowComposeButtonOnMessageList: Boolean) } legacy/core/src/main/java/com/fsck/k9/K9.kt +0 −7 Original line number Diff line number Diff line Loading @@ -220,10 +220,6 @@ object K9 : KoinComponent { var sortType: SortType = AccountDefaultsProvider.DEFAULT_SORT_TYPE private val sortAscending = mutableMapOf<SortType, Boolean>() @get:Synchronized @set:Synchronized var isShowComposeButtonOnMessageList = true @get:Synchronized @set:Synchronized @JvmStatic Loading Loading @@ -359,8 +355,6 @@ object K9 : KoinComponent { ) splitViewMode = storage.getEnum("splitViewMode", SplitViewMode.NEVER) isShowComposeButtonOnMessageList = storage.getBoolean("showComposeButtonOnMessageList", true) isThreadedViewEnabled = storage.getBoolean("threadedView", true) featureFlagProvider.provide("disable_font_size_config".toFeatureFlagKey()) Loading Loading @@ -437,7 +431,6 @@ object K9 : KoinComponent { editor.putString("notificationQuickDelete", notificationQuickDeleteBehaviour.toString()) editor.putString("lockScreenNotificationVisibility", lockScreenNotificationVisibility.toString()) editor.putBoolean("showComposeButtonOnMessageList", isShowComposeButtonOnMessageList) editor.putBoolean("threadedView", isThreadedViewEnabled) editor.putEnum("splitViewMode", splitViewMode) Loading legacy/core/src/main/java/com/fsck/k9/preferences/RealGeneralSettingsManager.kt +7 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ internal const val KEY_SHOULD_SHOW_SETUP_ARCHIVE_FOLDER_DIALOG = "shouldShowSetu internal const val KEY_CHANGE_REGISTERED_NAME_COLOR = "changeRegisteredNameColor" internal const val KEY_COLORIZE_MISSING_CONTACT_PICTURE = "colorizeMissingContactPictures" internal const val KEY_USE_BACKGROUND_AS_UNREAD_INDICATOR = "isUseBackgroundAsUnreadIndicator" internal const val KEY_SHOW_COMPOSE_BUTTON_ON_MESSAGE_LIST = "showComposeButtonOnMessageList" /** * Retrieve and modify general settings. Loading Loading @@ -190,6 +191,10 @@ internal class RealGeneralSettingsManager( getSettings().copy(isUseBackgroundAsUnreadIndicator = isUseBackgroundAsUnreadIndicator).persist() } override fun setIsShowComposeButtonOnMessageList(isShowComposeButtonOnMessageList: Boolean) { getSettings().copy(isShowComposeButtonOnMessageList = isShowComposeButtonOnMessageList).persist() } private fun writeSettings(editor: StorageEditor, settings: GeneralSettings) { editor.putBoolean("showRecentChanges", settings.showRecentChanges) editor.putEnum("theme", settings.appTheme) Loading @@ -208,6 +213,7 @@ internal class RealGeneralSettingsManager( editor.putBoolean(KEY_CHANGE_REGISTERED_NAME_COLOR, settings.isChangeContactNameColor) editor.putBoolean(KEY_COLORIZE_MISSING_CONTACT_PICTURE, settings.isColorizeMissingContactPictures) editor.putBoolean(KEY_USE_BACKGROUND_AS_UNREAD_INDICATOR, settings.isUseBackgroundAsUnreadIndicator) editor.putBoolean(KEY_SHOW_COMPOSE_BUTTON_ON_MESSAGE_LIST, settings.isShowComposeButtonOnMessageList) } private fun loadGeneralSettings(): GeneralSettings { Loading Loading @@ -241,6 +247,7 @@ internal class RealGeneralSettingsManager( isColorizeMissingContactPictures = storage.getBoolean(KEY_COLORIZE_MISSING_CONTACT_PICTURE, true), isChangeContactNameColor = storage.getBoolean(KEY_CHANGE_REGISTERED_NAME_COLOR, false), isUseBackgroundAsUnreadIndicator = storage.getBoolean(KEY_USE_BACKGROUND_AS_UNREAD_INDICATOR, false), isShowComposeButtonOnMessageList = storage.getBoolean(KEY_SHOW_COMPOSE_BUTTON_ON_MESSAGE_LIST, true), ) updateSettingsFlow(settings) Loading legacy/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityConfig.kt +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ data class MessageListActivityConfig( isShowContactPicture = settings.isShowContactPicture, isColorizeMissingContactPictures = settings.isColorizeMissingContactPictures, isUseBackgroundAsUnreadIndicator = settings.isUseBackgroundAsUnreadIndicator, isShowComposeButton = K9.isShowComposeButtonOnMessageList, isShowComposeButton = settings.isShowComposeButtonOnMessageList, contactNameColor = K9.contactNameColor, messageViewTheme = settings.messageViewTheme, messageListPreviewLines = K9.messageListPreviewLines, Loading Loading
core/preference/api/src/commonMain/kotlin/net/thunderbird/core/preference/GeneralSettings.kt +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ data class GeneralSettings( val isChangeContactNameColor: Boolean, val isColorizeMissingContactPictures: Boolean, val isUseBackgroundAsUnreadIndicator: Boolean, val isShowComposeButtonOnMessageList: Boolean, ) enum class BackgroundSync { Loading
core/preference/api/src/commonMain/kotlin/net/thunderbird/core/preference/GeneralSettingsManager.kt +1 −0 Original line number Diff line number Diff line Loading @@ -28,4 +28,5 @@ interface GeneralSettingsManager { fun setIsChangeContactNameColor(isChangeContactNameColor: Boolean) fun setIsColorizeMissingContactPictures(isColorizeMissingContactPictures: Boolean) fun setIsUseBackgroundAsUnreadIndicator(isUseBackgroundAsUnreadIndicator: Boolean) fun setIsShowComposeButtonOnMessageList(isShowComposeButtonOnMessageList: Boolean) }
legacy/core/src/main/java/com/fsck/k9/K9.kt +0 −7 Original line number Diff line number Diff line Loading @@ -220,10 +220,6 @@ object K9 : KoinComponent { var sortType: SortType = AccountDefaultsProvider.DEFAULT_SORT_TYPE private val sortAscending = mutableMapOf<SortType, Boolean>() @get:Synchronized @set:Synchronized var isShowComposeButtonOnMessageList = true @get:Synchronized @set:Synchronized @JvmStatic Loading Loading @@ -359,8 +355,6 @@ object K9 : KoinComponent { ) splitViewMode = storage.getEnum("splitViewMode", SplitViewMode.NEVER) isShowComposeButtonOnMessageList = storage.getBoolean("showComposeButtonOnMessageList", true) isThreadedViewEnabled = storage.getBoolean("threadedView", true) featureFlagProvider.provide("disable_font_size_config".toFeatureFlagKey()) Loading Loading @@ -437,7 +431,6 @@ object K9 : KoinComponent { editor.putString("notificationQuickDelete", notificationQuickDeleteBehaviour.toString()) editor.putString("lockScreenNotificationVisibility", lockScreenNotificationVisibility.toString()) editor.putBoolean("showComposeButtonOnMessageList", isShowComposeButtonOnMessageList) editor.putBoolean("threadedView", isThreadedViewEnabled) editor.putEnum("splitViewMode", splitViewMode) Loading
legacy/core/src/main/java/com/fsck/k9/preferences/RealGeneralSettingsManager.kt +7 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ internal const val KEY_SHOULD_SHOW_SETUP_ARCHIVE_FOLDER_DIALOG = "shouldShowSetu internal const val KEY_CHANGE_REGISTERED_NAME_COLOR = "changeRegisteredNameColor" internal const val KEY_COLORIZE_MISSING_CONTACT_PICTURE = "colorizeMissingContactPictures" internal const val KEY_USE_BACKGROUND_AS_UNREAD_INDICATOR = "isUseBackgroundAsUnreadIndicator" internal const val KEY_SHOW_COMPOSE_BUTTON_ON_MESSAGE_LIST = "showComposeButtonOnMessageList" /** * Retrieve and modify general settings. Loading Loading @@ -190,6 +191,10 @@ internal class RealGeneralSettingsManager( getSettings().copy(isUseBackgroundAsUnreadIndicator = isUseBackgroundAsUnreadIndicator).persist() } override fun setIsShowComposeButtonOnMessageList(isShowComposeButtonOnMessageList: Boolean) { getSettings().copy(isShowComposeButtonOnMessageList = isShowComposeButtonOnMessageList).persist() } private fun writeSettings(editor: StorageEditor, settings: GeneralSettings) { editor.putBoolean("showRecentChanges", settings.showRecentChanges) editor.putEnum("theme", settings.appTheme) Loading @@ -208,6 +213,7 @@ internal class RealGeneralSettingsManager( editor.putBoolean(KEY_CHANGE_REGISTERED_NAME_COLOR, settings.isChangeContactNameColor) editor.putBoolean(KEY_COLORIZE_MISSING_CONTACT_PICTURE, settings.isColorizeMissingContactPictures) editor.putBoolean(KEY_USE_BACKGROUND_AS_UNREAD_INDICATOR, settings.isUseBackgroundAsUnreadIndicator) editor.putBoolean(KEY_SHOW_COMPOSE_BUTTON_ON_MESSAGE_LIST, settings.isShowComposeButtonOnMessageList) } private fun loadGeneralSettings(): GeneralSettings { Loading Loading @@ -241,6 +247,7 @@ internal class RealGeneralSettingsManager( isColorizeMissingContactPictures = storage.getBoolean(KEY_COLORIZE_MISSING_CONTACT_PICTURE, true), isChangeContactNameColor = storage.getBoolean(KEY_CHANGE_REGISTERED_NAME_COLOR, false), isUseBackgroundAsUnreadIndicator = storage.getBoolean(KEY_USE_BACKGROUND_AS_UNREAD_INDICATOR, false), isShowComposeButtonOnMessageList = storage.getBoolean(KEY_SHOW_COMPOSE_BUTTON_ON_MESSAGE_LIST, true), ) updateSettingsFlow(settings) Loading
legacy/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityConfig.kt +1 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ data class MessageListActivityConfig( isShowContactPicture = settings.isShowContactPicture, isColorizeMissingContactPictures = settings.isColorizeMissingContactPictures, isUseBackgroundAsUnreadIndicator = settings.isUseBackgroundAsUnreadIndicator, isShowComposeButton = K9.isShowComposeButtonOnMessageList, isShowComposeButton = settings.isShowComposeButtonOnMessageList, contactNameColor = K9.contactNameColor, messageViewTheme = settings.messageViewTheme, messageListPreviewLines = K9.messageListPreviewLines, Loading