Sort rooms by last event, not unread count.

This commit is contained in:
Black Hat
2018-09-18 20:57:38 +08:00
parent 86ea5d02c1
commit 0361432c3d
5 changed files with 14 additions and 3 deletions

View File

@@ -140,3 +140,8 @@ void SpectralRoom::sendReply(QString userId, QString eventId,
"</blockquote></mx-reply>" + sendContent}};
postJson("m.room.message", json);
}
QDateTime SpectralRoom::lastActiveTime() {
if (timelineSize() == 0) return QDateTime();
return messageEvents().rbegin()->get()->timestamp();
}