Hide edit event.
Also libQuotient refuses to compile.
This commit is contained in:
Submodule include/libQuotient updated: 64bea52b86...7b938d45a7
@@ -138,7 +138,7 @@ void MessageEventModel::setRoom(SpectralRoom* room) {
|
|||||||
});
|
});
|
||||||
connect(m_currentRoom, &Room::updatedEvent, this,
|
connect(m_currentRoom, &Room::updatedEvent, this,
|
||||||
[this](const QString& eventId) {
|
[this](const QString& eventId) {
|
||||||
refreshEventRoles(eventId, {ReactionRole});
|
refreshEventRoles(eventId, {ReactionRole, Qt::DisplayRole});
|
||||||
});
|
});
|
||||||
connect(m_currentRoom, &Room::fileTransferProgress, this,
|
connect(m_currentRoom, &Room::fileTransferProgress, this,
|
||||||
&MessageEventModel::refreshEvent);
|
&MessageEventModel::refreshEvent);
|
||||||
@@ -381,6 +381,12 @@ QVariant MessageEventModel::data(const QModelIndex& idx, int role) const {
|
|||||||
static_cast<const StateEventBase&>(evt).repeatsState())
|
static_cast<const StateEventBase&>(evt).repeatsState())
|
||||||
return EventStatus::Hidden;
|
return EventStatus::Hidden;
|
||||||
|
|
||||||
|
if (auto e = eventCast<const RoomMessageEvent>(&evt)) {
|
||||||
|
if (!e->replacedEvent().isEmpty()) {
|
||||||
|
return EventStatus::Hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (m_currentRoom->connection()->isIgnored(
|
if (m_currentRoom->connection()->isIgnored(
|
||||||
m_currentRoom->user(evt.senderId())))
|
m_currentRoom->user(evt.senderId())))
|
||||||
return EventStatus::Hidden;
|
return EventStatus::Hidden;
|
||||||
|
|||||||
@@ -129,6 +129,12 @@ QString SpectralRoom::lastEvent() {
|
|||||||
static_cast<const StateEventBase&>(*evt).repeatsState())
|
static_cast<const StateEventBase&>(*evt).repeatsState())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (auto e = eventCast<const RoomMessageEvent>(evt)) {
|
||||||
|
if (!e->replacedEvent().isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (connection()->isIgnored(user(evt->senderId())))
|
if (connection()->isIgnored(user(evt->senderId())))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -454,6 +460,6 @@ void SpectralRoom::toggleReaction(const QString& eventId,
|
|||||||
redactEvent(redactEventId);
|
redactEvent(redactEventId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
postEvent(new ReactionEvent(EventRelation::annotate(eventId, reaction)));
|
postReaction(eventId, reaction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user