mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-11-01 22:03:29 +01:00
Optional "when charging only" toggle for BG updates (#1914)
This commit is contained in:
@@ -349,6 +349,15 @@ class SettingsProvider with ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get bgUpdatesWhileChargingOnly {
|
||||
return prefs?.getBool('bgUpdatesWhileChargingOnly') ?? false;
|
||||
}
|
||||
|
||||
set bgUpdatesWhileChargingOnly(bool val) {
|
||||
prefs?.setBool('bgUpdatesWhileChargingOnly', val);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
DateTime get lastCompletedBGCheckTime {
|
||||
int? temp = prefs?.getInt('lastCompletedBGCheckTime');
|
||||
return temp != null
|
||||
|
||||
Reference in New Issue
Block a user