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) {
|
final listEmails = emailChangeResponse?.created ?? [];
|
||||||
return EmailsResponse(emailList: emailChangeResponse.created ?? []);
|
listEmails.sortBy(EmailComparator(EmailComparatorProperty.receivedAt)..setIsAscending(true));
|
||||||
|
|
||||||
|
if (listEmails.isNotEmpty) {
|
||||||
|
return EmailsResponse(emailList: listEmails);
|
||||||
} else {
|
} else {
|
||||||
return EmailsResponse();
|
return EmailsResponse();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user