Skip to content

Commit 5376f37

Browse files
committed
style(account): improve code formatting in in_app_notification_center_bloc.dart
- Adjust line breaks and indentation for better readability - Ensure consistent code style throughout the file
1 parent d6a12e8 commit 5376f37

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/account/bloc/in_app_notification_center_bloc.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)