diff --git a/collect_app/src/main/java/org/odk/collect/android/mainmenu/MainMenuActivity.kt b/collect_app/src/main/java/org/odk/collect/android/mainmenu/MainMenuActivity.kt index 6c7cb340004..b1807ad3e7b 100644 --- a/collect_app/src/main/java/org/odk/collect/android/mainmenu/MainMenuActivity.kt +++ b/collect_app/src/main/java/org/odk/collect/android/mainmenu/MainMenuActivity.kt @@ -8,7 +8,6 @@ import org.odk.collect.android.R import org.odk.collect.android.activities.ActivityUtils import org.odk.collect.android.activities.CrashHandlerActivity import org.odk.collect.android.activities.FirstLaunchActivity -import org.odk.collect.android.application.FeatureFlags import org.odk.collect.android.injection.DaggerUtils import org.odk.collect.android.projects.ProjectSettingsDialog import org.odk.collect.android.utilities.ThemeUtils @@ -58,9 +57,7 @@ class MainMenuActivity : LocalizedActivity() { val viewModelProvider = ViewModelProvider(this, viewModelFactory) currentProjectViewModel = viewModelProvider[CurrentProjectViewModel::class.java] - if (!FeatureFlags.NO_THEME_SETTING) { - ThemeUtils(this).setDarkModeForCurrentProject() - } + ThemeUtils(this).setDarkModeForCurrentProject() if (!currentProjectViewModel.hasCurrentProject()) { super.onCreate(null) diff --git a/collect_app/src/main/java/org/odk/collect/android/utilities/ThemeUtils.java b/collect_app/src/main/java/org/odk/collect/android/utilities/ThemeUtils.java index d2fea99c703..d62ba39383b 100644 --- a/collect_app/src/main/java/org/odk/collect/android/utilities/ThemeUtils.java +++ b/collect_app/src/main/java/org/odk/collect/android/utilities/ThemeUtils.java @@ -29,6 +29,7 @@ import androidx.appcompat.app.AppCompatDelegate; import org.odk.collect.android.R; +import org.odk.collect.android.application.FeatureFlags; import org.odk.collect.android.injection.DaggerUtils; import org.odk.collect.settings.SettingsProvider; import org.odk.collect.settings.keys.ProjectKeys; @@ -84,12 +85,12 @@ public int getSpinnerTimePickerDialogTheme() { R.style.Theme_Collect_Light_Spinner_TimePicker_Dialog; } - public int getAccountPickerTheme() { - return isDarkTheme() ? 0 : 1; - } - public boolean isSystemTheme() { - return getPrefsTheme().equals(context.getString(org.odk.collect.strings.R.string.app_theme_system)); + if (FeatureFlags.NO_THEME_SETTING) { + return true; + } else { + return getPrefsTheme().equals(context.getString(org.odk.collect.strings.R.string.app_theme_system)); + } } public boolean isDarkTheme() {