Add isDarkModeEnabled function

Signed-off-by: Alper Ozturk <alperozturk@lions-macbook.local>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
Alper Ozturk 2023-10-05 08:46:46 +02:00 committed by alperozturk
parent b0c584b9f2
commit 9e4bac2aad
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF
2 changed files with 6 additions and 0 deletions

View file

@ -71,6 +71,7 @@ public interface AppPreferences {
boolean instantPictureUploadEnabled();
boolean instantVideoUploadEnabled();
boolean isDarkModeEnabled();
boolean isShowHiddenFilesEnabled();
void setShowHiddenFilesEnabled(boolean enabled);

View file

@ -435,6 +435,11 @@ public final class AppPreferencesImpl implements AppPreferences {
return preferences.getInt(AUTO_PREF__UPLOADER_BEHAVIOR, 1);
}
@Override
public boolean isDarkModeEnabled() {
return getDarkThemeMode() == DarkMode.DARK;
}
@Override
public void setDarkThemeMode(DarkMode mode) {
preferences.edit().putString(PREF__DARK_THEME, mode.name()).apply();