@@ -340,15 +340,15 @@ class InAppNotificationCenterBloc
340340 InAppNotificationCenterReadItemsDeleted event,
341341 Emitter <InAppNotificationCenterState > emit,
342342 ) async {
343-
344343 final userId = _appBloc.state.user? .id;
345344 final isBreakingNewsTab = state.currentTabIndex == 0 ;
346345 final notificationsForTab = isBreakingNewsTab
347346 ? state.breakingNewsNotifications
348347 : state.digestNotifications;
349348
350- final readNotifications =
351- notificationsForTab.where ((n) => n.isRead).toList ();
349+ final readNotifications = notificationsForTab
350+ .where ((n) => n.isRead)
351+ .toList ();
352352
353353 if (readNotifications.isEmpty) {
354354 _logger.info ('No read notifications to delete in the current tab.' );
@@ -359,12 +359,14 @@ class InAppNotificationCenterBloc
359359
360360 // Optimistic UI update: remove the read items from the state immediately.
361361 if (isBreakingNewsTab) {
362- final updatedList =
363- state.breakingNewsNotifications.where ((n) => ! n.isRead).toList ();
362+ final updatedList = state.breakingNewsNotifications
363+ .where ((n) => ! n.isRead)
364+ .toList ();
364365 emit (state.copyWith (breakingNewsNotifications: updatedList));
365366 } else {
366- final updatedList =
367- state.digestNotifications.where ((n) => ! n.isRead).toList ();
367+ final updatedList = state.digestNotifications
368+ .where ((n) => ! n.isRead)
369+ .toList ();
368370 emit (state.copyWith (digestNotifications: updatedList));
369371 }
370372
0 commit comments