Fixed bug with two dialogs (first with last messages and second not with it)

This commit is contained in:
ChronosX88 2019-05-24 22:54:19 +04:00
parent dc66de02fb
commit 8b9c07de89

View File

@ -56,6 +56,11 @@ public class DialogListPresenter implements CoreContracts.IDialogListPresenterCo
if(dialog2.getLastMessage() != null && dialog1.getLastMessage() != null) {
return Long.compare(dialog2.getLastMessage().getCreatedAt().getTime(), dialog1.getLastMessage().getCreatedAt().getTime());
}
if(dialog2.getLastMessage() != null) {
return 1;
} else if(dialog1.getLastMessage() != null) {
return -1;
}
return 0;
};