File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,6 @@ class RaceListHeaderItem extends StatelessWidget {
6464 scheduleLastSavedFormat = Hive .box ('requests' )
6565 .get ('f1ScheduleLastSavedFormat' , defaultValue: 'ergast' );
6666 }
67- bool useDarkMode =
68- Hive .box ('settings' ).get ('darkMode' , defaultValue: true ) as bool ;
6967 bool shouldUse12HourClock = Hive .box ('settings' )
7068 .get ('shouldUse12HourClock' , defaultValue: false ) as bool ;
7169 List months = [
@@ -439,8 +437,9 @@ class RacesList extends StatelessWidget {
439437
440438 @override
441439 Widget build (BuildContext context) {
442- // TODO: check that it is actually activated
443- if (items.isNotEmpty && isUpNext && ! isCache) {
440+ bool notificationsEnabled = Hive .box ('settings' )
441+ .get ('notificationsEnabled' , defaultValue: false ) as bool ;
442+ if (items.isNotEmpty && isUpNext && ! isCache && notificationsEnabled) {
444443 scheduledNotification (items[0 ].meetingId);
445444 }
446445 return isUpNext
You can’t perform that action at this time.
0 commit comments