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 Feb 14, 2024
1 parent f59caa7 commit a6aa9ff
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 @@ -899,10 +899,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 a6aa9ff

Please sign in to comment.