Fixed important in notification

This commit is contained in:
llsajjad
2025-09-27 14:57:42 +03:30
parent 359f7f2608
commit ca81da026d
5 changed files with 36 additions and 21 deletions
@@ -17,15 +17,7 @@ class NotificationImportantTab extends StatelessWidget {
return const Center(child: CircularProgressIndicator());
}
final importantFromApi = viewModel.importantNotificationResponse?.data ?? [];
final allNotifications = viewModel.allNotificationResponse?.data ?? [];
final source = importantFromApi.isNotEmpty ? importantFromApi : allNotifications;
final importantNotifications = source
.where((n) => (n.priority ?? '').toLowerCase() == 'important')
.toList();
final importantNotifications = viewModel.importantNotificationResponse?.data ?? [];
if (importantNotifications.isEmpty) {
return const Center(child: Text(NotificationStrings.noImportantNotifications));