Hide local edit message
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
This commit is contained in:
@@ -605,6 +605,11 @@ QVariant MessageEventModel::data(const QModelIndex &idx, int role) const
|
|||||||
|
|
||||||
if (role == SpecialMarksRole) {
|
if (role == SpecialMarksRole) {
|
||||||
if (isPending) {
|
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();
|
return pendingIt->deliveryStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user