Cherrypick Hide local edit message to 23.04

When a local message is edited make sure that the initial message that will be merged remains hidden so it doesn't flash up then disappear.

closes network/neochat#314


(cherry picked from commit 4e16b91f54)
This commit is contained in:
James Graham
2023-03-17 10:40:23 +00:00
parent bd9fb097e3
commit 0032d417ac

View File

@@ -605,6 +605,11 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
if (role == SpecialMarksRole) {
if (isPending) {
// A pending event with an m.new_content key will be merged into the
// original event so don't show.
if (evt.contentJson().contains("m.new_content")) {
return EventStatus::Hidden;
}
return pendingIt->deliveryStatus();
}