Skip to content

Instantly share code, notes, and snippets.

@rubenlagus
Created September 22, 2014 15:12
Show Gist options
  • Save rubenlagus/3da56a67638d56f41410 to your computer and use it in GitHub Desktop.
Save rubenlagus/3da56a67638d56f41410 to your computer and use it in GitHub Desktop.
Orden
if (tl_dialog.unread_count > 0 && tl_dialog2.unread_count <= 0) {
return -1;
}
else if (tl_dialog.unread_count <= 0 && tl_dialog2.unread_count > 0) {
return 1;
}
else {
if (tl_dialog.last_message_date == tl_dialog2.last_message_date) {
return 0;
} else if (tl_dialog.last_message_date < tl_dialog2.last_message_date) {
return 1;
} else {
return -1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment