Show unable to decrypt events in the room list
These were previously (unintentionally) filtered, but I wanted to add them because without showing and caching them my DMs look extremely out of order. And assuming that you get an unexpected "unable to decrypt" event, you would want that room to "shoot to the top" anyway.
This commit is contained in:
committed by
Tobias Fella
parent
4af42a57f4
commit
0ee89e1b2b
@@ -448,6 +448,9 @@ QString EventHandler::getBody(const NeoChatRoom *room, const Quotient::RoomEvent
|
||||
[](const PollStartEvent &e) {
|
||||
return e.question();
|
||||
},
|
||||
[](const EncryptedEvent &) {
|
||||
return i18nc("@info In room list", "Encrypted event");
|
||||
},
|
||||
i18n("Unknown event"));
|
||||
}
|
||||
|
||||
|
||||
@@ -359,9 +359,14 @@ const RoomEvent *NeoChatRoom::lastEvent(std::function<bool(const RoomEvent *)> f
|
||||
if (auto lastEvent = eventCast<const RoomMessageEvent>(event)) {
|
||||
return lastEvent;
|
||||
}
|
||||
|
||||
if (auto lastEvent = eventCast<const PollStartEvent>(event)) {
|
||||
return lastEvent;
|
||||
}
|
||||
|
||||
if (auto lastEvent = eventCast<const EncryptedEvent>(event)) {
|
||||
return lastEvent;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_cachedEvent != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user