Fix image delegate color && fix lastEvent.

This commit is contained in:
Black Hat
2018-09-03 09:56:21 +08:00
parent 104e194cfb
commit 0301590b44
3 changed files with 3 additions and 2 deletions

View File

@@ -83,6 +83,7 @@ void MatriqueRoom::sendTypingNotification(bool isTyping) {
QString MatriqueRoom::lastEvent() {
if (timelineSize() == 0) return "";
const RoomEvent* lastEvent = messageEvents().rbegin()->get();
if (lastEvent->contentJson().value("body").toString() == "") return "";
return user(lastEvent->senderId())->displayname() + ": " +
lastEvent->contentJson().value("body").toString();
}