Fixed important in notification
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user