File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ class _NotificationsSettingsScreenState
106106 if (value) {
107107 await Notifications ().registerPeriodicTask ();
108108 } else {
109- Workmanager ().cancelAll ();
109+ await Workmanager ().cancelAll ();
110110 }
111111 setState (
112112 () {
@@ -163,14 +163,13 @@ class _NotificationsSettingsScreenState
163163 trailing: DropdownButton (
164164 value: refreshInterval,
165165 onChanged: notificationsEnabled && newsNotificationsEnabled
166- ? (int ? newValue) {
166+ ? (int ? newValue) async {
167167 if (newValue != null ) {
168+ refreshInterval = newValue;
169+ Hive .box ('settings' ).put ('refreshInterval' , newValue);
170+ await Notifications ().registerPeriodicTask ();
168171 setState (
169- () {
170- refreshInterval = newValue;
171- Hive .box ('settings' )
172- .put ('refreshInterval' , newValue);
173- },
172+ () {},
174173 );
175174 }
176175 }
You can’t perform that action at this time.
0 commit comments