Refactor dark mode to allow multiple themes

This commit is contained in:
Michael Schättgen 2019-03-28 00:54:30 +01:00
parent 9baaf824c6
commit cf4aecbd3e
7 changed files with 64 additions and 17 deletions

View file

@ -43,6 +43,15 @@ public class Preferences {
return _prefs.getInt("pref_tap_to_reveal_time", 30);
}
public int getCurrentTheme() {
return _prefs.getInt("pref_current_theme", 0);
}
public void setCurrentTheme(Theme theme) {
_prefs.edit().putInt("pref_current_theme", theme.ordinal()).apply();
}
public int getTimeout() {
return _prefs.getInt("pref_timeout", -1);