Skip to content

Commit

Permalink
System default night mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder-tsys committed Jan 10, 2024
1 parent e625f45 commit 8eaeebd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/src/main/java/com/owncloud/android/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -882,10 +882,7 @@ public AndroidInjector<Object> androidInjector() {
}

public static void setAppTheme(DarkMode mode) {
switch (mode) {
case LIGHT -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
case DARK -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
case SYSTEM -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
}
// NMC Customization -> Always follow system theme
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
}
}

0 comments on commit 8eaeebd

Please sign in to comment.