better gestures, more settings, stability fixes
This commit is contained in:
parent
7a1395220c
commit
f005073ad5
4 changed files with 151 additions and 75 deletions
|
|
@ -8,6 +8,8 @@ class AppSettings extends ChangeNotifier {
|
|||
bool _darkTheme = false;
|
||||
bool _sortLastUsed = true;
|
||||
bool _autoFocus = true;
|
||||
bool _showStatusIcons = true;
|
||||
bool _hideDemoted = false;
|
||||
|
||||
bool get showTags => _showTags;
|
||||
bool get showIcons => _showIcons;
|
||||
|
|
@ -15,6 +17,8 @@ class AppSettings extends ChangeNotifier {
|
|||
bool get darkTheme => _darkTheme;
|
||||
bool get sortLastUsed => _sortLastUsed;
|
||||
bool get autoFocus => _autoFocus;
|
||||
bool get showStatusIcons => _showStatusIcons;
|
||||
bool get hideDemoted => _hideDemoted;
|
||||
|
||||
final SharedPreferencesService _prefsService = SharedPreferencesService();
|
||||
|
||||
|
|
@ -29,6 +33,8 @@ class AppSettings extends ChangeNotifier {
|
|||
_darkTheme = _prefsService.getBool('darkTheme', false);
|
||||
_sortLastUsed = _prefsService.getBool('sortLastUsed', true);
|
||||
_autoFocus = _prefsService.getBool('autoFocus', true);
|
||||
_showStatusIcons = _prefsService.getBool('showStatusIcons', true);
|
||||
_hideDemoted = _prefsService.getBool('hideDemoted', false);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
|
@ -52,6 +58,12 @@ class AppSettings extends ChangeNotifier {
|
|||
case 'autoFocus':
|
||||
_autoFocus = value;
|
||||
break;
|
||||
case 'showStatusIcons':
|
||||
_showStatusIcons = value;
|
||||
break;
|
||||
case 'hideDemoted':
|
||||
_hideDemoted = value;
|
||||
break;
|
||||
}
|
||||
await _prefsService.setBool(key, value);
|
||||
notifyListeners(); // Notify listeners after updating the setting
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue