diff --git a/app/core/src/main/java/com/fsck/k9/K9.kt b/app/core/src/main/java/com/fsck/k9/K9.kt index 7b16adf6d..fe7e673b2 100644 --- a/app/core/src/main/java/com/fsck/k9/K9.kt +++ b/app/core/src/main/java/com/fsck/k9/K9.kt @@ -181,7 +181,8 @@ object K9 : KoinComponent { @JvmStatic var backgroundOps = BACKGROUND_OPS.WHEN_CHECKED_AUTO_SYNC - private var animations = true + @JvmStatic + var isShowAnimations = true private var confirmDelete = false private var confirmDiscardMessage = true @@ -310,15 +311,6 @@ object K9 : KoinComponent { updateLoggingStatus() } - @JvmStatic - fun showAnimations(): Boolean { - return animations - } - - fun setAnimations(animations: Boolean) { - K9.animations = animations - } - @JvmStatic fun messageListPreviewLines(): Int { return messageListPreviewLines @@ -570,7 +562,7 @@ object K9 : KoinComponent { val storage = prefs.storage isDebug = storage.getBoolean("enableDebugLogging", DEVELOPER_MODE) DEBUG_SENSITIVE = storage.getBoolean("enableSensitiveLogging", false) - animations = storage.getBoolean("animations", true) + isShowAnimations = storage.getBoolean("animations", true) isGesturesEnabled = storage.getBoolean("gesturesEnabled", false) isUseVolumeKeysForNavigation = storage.getBoolean("useVolumeKeysForNavigation", false) isUseVolumeKeysForListNavigation = storage.getBoolean("useVolumeKeysForListNavigation", false) @@ -692,7 +684,7 @@ object K9 : KoinComponent { editor.putBoolean("enableDebugLogging", DEBUG) editor.putBoolean("enableSensitiveLogging", DEBUG_SENSITIVE) editor.putString("backgroundOperations", K9.backgroundOps.name) - editor.putBoolean("animations", animations) + editor.putBoolean("animations", isShowAnimations) editor.putBoolean("gesturesEnabled", isGesturesEnabled) editor.putBoolean("useVolumeKeysForNavigation", isUseVolumeKeysForNavigation) editor.putBoolean("useVolumeKeysForListNavigation", isUseVolumeKeysForListNavigation) diff --git a/app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt b/app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt index 59ee8c439..f6c23d55b 100644 --- a/app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt +++ b/app/ui/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt @@ -18,7 +18,7 @@ class GeneralSettingsDataStore( override fun getBoolean(key: String, defValue: Boolean): Boolean { return when (key) { "fixed_message_view_theme" -> K9.isFixedMessageViewTheme - "animations" -> K9.showAnimations() + "animations" -> K9.isShowAnimations "measure_accounts" -> K9.measureAccounts() "count_search" -> K9.countSearchMessages() "hide_special_accounts" -> K9.isHideSpecialAccounts @@ -52,7 +52,7 @@ class GeneralSettingsDataStore( override fun putBoolean(key: String, value: Boolean) { when (key) { "fixed_message_view_theme" -> K9.isFixedMessageViewTheme = value - "animations" -> K9.setAnimations(value) + "animations" -> K9.isShowAnimations = value "measure_accounts" -> K9.setMeasureAccounts(value) "count_search" -> K9.setCountSearchMessages(value) "hide_special_accounts" -> K9.isHideSpecialAccounts = value diff --git a/app/ui/src/main/java/com/fsck/k9/view/ViewSwitcher.java b/app/ui/src/main/java/com/fsck/k9/view/ViewSwitcher.java index f38beb7f2..41a39219a 100644 --- a/app/ui/src/main/java/com/fsck/k9/view/ViewSwitcher.java +++ b/app/ui/src/main/java/com/fsck/k9/view/ViewSwitcher.java @@ -49,7 +49,7 @@ public class ViewSwitcher extends ViewAnimator implements AnimationListener { } private void setupAnimations(Animation in, Animation out) { - if (K9.showAnimations()) { + if (K9.isShowAnimations()) { setInAnimation(in); setOutAnimation(out); out.setAnimationListener(this); @@ -60,7 +60,7 @@ public class ViewSwitcher extends ViewAnimator implements AnimationListener { } private void handleSwitchCompleteCallback() { - if (!K9.showAnimations()) { + if (!K9.isShowAnimations()) { onAnimationEnd(null); } }