diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/utils/SharedPreferenceUtil.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/utils/SharedPreferenceUtil.kt index fc3dc5807..25b5ea993 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/utils/SharedPreferenceUtil.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/utils/SharedPreferenceUtil.kt @@ -127,7 +127,8 @@ class SharedPreferenceUtil @Inject constructor(context: Context?) { val nightMode: NightModeConfig.Mode get() = from( - sharedPreferences.getString("", null)?.toInt() ?: AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM + sharedPreferences.getString(PREF_NIGHT_MODE, null)?.toInt() + ?: AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM ) fun nightModes(): Flowable = nightModes.startWith(nightMode)