Sort notification list in order of last received date
This commit is contained in:
@@ -74,8 +74,11 @@ class FCMRepositoryImpl extends FCMRepository {
|
||||
}
|
||||
}
|
||||
|
||||
if (emailChangeResponse != null) {
|
||||
return EmailsResponse(emailList: emailChangeResponse.created ?? []);
|
||||
final listEmails = emailChangeResponse?.created ?? [];
|
||||
listEmails.sortBy(EmailComparator(EmailComparatorProperty.receivedAt)..setIsAscending(true));
|
||||
|
||||
if (listEmails.isNotEmpty) {
|
||||
return EmailsResponse(emailList: listEmails);
|
||||
} else {
|
||||
return EmailsResponse();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user