Skip to content

Commit

Permalink
[Infrastructure] Make sure we cancel the right notification
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Jun 6, 2021
1 parent 7acaff6 commit 5da170f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/infrastructure/notification_service.dart
Expand Up @@ -76,7 +76,8 @@ class NotificationServiceImpl implements NotificationService {

@override
Future<void> cancelNotification(int id, AppNotificationType type) {
return _flutterLocalNotificationsPlugin.cancel(id, tag: _getTagFromNotificationType(type));
final realId = _generateUniqueId(id, type);
return _flutterLocalNotificationsPlugin.cancel(realId, tag: _getTagFromNotificationType(type));
}

@override
Expand Down Expand Up @@ -162,6 +163,6 @@ class NotificationServiceImpl implements NotificationService {
case AppNotificationType.dailyCheckIn:
return 100;
}
throw Exception('The provided type = $type is not a valid notification type');
throw Exception('The provided type = $type is not a valid notification type');
}
}
2 changes: 1 addition & 1 deletion lib/presentation/game_codes/game_codes_page.dart
Expand Up @@ -126,9 +126,9 @@ class _GameCodesPageState extends State<GameCodesPage> with SingleTickerProvider

Future<void> _showInfoDialog(BuildContext context) async {
final s = S.of(context);
//TODO: SWIPE TO SEE MORE
final explanations = [
s.internetIsRequiredToRefreshItems,
s.swipeToSeeMoreOptions,
];
await showDialog(
context: context,
Expand Down

0 comments on commit 5da170f

Please sign in to comment.