Added BG update check interval + bugfixes

This commit is contained in:
Imran Remtulla
2022-08-26 17:15:16 -04:00
parent 2aca9d680b
commit 9459c96d48
4 changed files with 80 additions and 36 deletions

View File

@@ -14,7 +14,6 @@ class _AppsPageState extends State<AppsPage> {
@override
Widget build(BuildContext context) {
var appsProvider = context.watch<AppsProvider>();
appsProvider.checkUpdates();
var existingUpdateAppIds = appsProvider.getExistingUpdates();
return Scaffold(

View File

@@ -66,6 +66,44 @@ class _SettingsPageState extends State<SettingsPage> {
settingsProvider.colour = value;
}
}),
const SizedBox(
height: 16,
),
DropdownButtonFormField(
decoration: const InputDecoration(
labelText: 'Background Update Checking Interval'),
value: settingsProvider.updateInterval,
items: const [
DropdownMenuItem(
value: 15,
child: Text('15 Minutes'),
),
DropdownMenuItem(
value: 30,
child: Text('30 Minutes'),
),
DropdownMenuItem(
value: 60,
child: Text('1 Hour'),
),
DropdownMenuItem(
value: 360,
child: Text('6 Hours'),
),
DropdownMenuItem(
value: 720,
child: Text('12 Hours'),
),
DropdownMenuItem(
value: 1440,
child: Text('1 Day'),
),
],
onChanged: (value) {
if (value != null) {
settingsProvider.updateInterval = value;
}
}),
const Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.end,