Hide edit event.

Also libQuotient refuses to compile.
This commit is contained in:
Black Hat
2019-07-31 19:07:35 +08:00
parent f7da8eebad
commit 7aa95c9289
3 changed files with 15 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ void MessageEventModel::setRoom(SpectralRoom* room) {
});
connect(m_currentRoom, &Room::updatedEvent, this,
[this](const QString& eventId) {
refreshEventRoles(eventId, {ReactionRole});
refreshEventRoles(eventId, {ReactionRole, Qt::DisplayRole});
});
connect(m_currentRoom, &Room::fileTransferProgress, this,
&MessageEventModel::refreshEvent);
@@ -381,6 +381,12 @@ QVariant MessageEventModel::data(const QModelIndex& idx, int role) const {
static_cast<const StateEventBase&>(evt).repeatsState())
return EventStatus::Hidden;
if (auto e = eventCast<const RoomMessageEvent>(&evt)) {
if (!e->replacedEvent().isEmpty()) {
return EventStatus::Hidden;
}
}
if (m_currentRoom->connection()->isIgnored(
m_currentRoom->user(evt.senderId())))
return EventStatus::Hidden;