Add a way to save current sorting method

This commit is contained in:
Michael Schättgen 2019-03-31 22:34:25 +02:00
parent b9d011b48e
commit bbf967e2b7
4 changed files with 56 additions and 6 deletions

View file

@ -39,6 +39,15 @@ public class Preferences {
_prefs.edit().putInt("pref_tap_to_reveal_time", number).apply();
}
public void setCurrentSortCategory(SortCategory category) {
_prefs.edit().putInt("pref_current_sort_category", category.ordinal()).apply();
}
public int getCurrentSortCategory() {
return _prefs.getInt("pref_current_sort_category", 0);
}
public int getTapToRevealTime() {
return _prefs.getInt("pref_tap_to_reveal_time", 30);
}