diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-02-16 18:58:38 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-02-16 18:58:38 +0100 |
commit | 65bd0993729deaa167c11daedcae65feb8bdf95a (patch) | |
tree | 46a1e7cec1c4eb64e03a4f4bc193167fcdb391c2 /src | |
parent | Try to fix flickering, if sync return event before send completes (diff) | |
download | nheko-65bd0993729deaa167c11daedcae65feb8bdf95a.tar.xz |
Don't delete messages received out of order (fixup the flickering fix)
Diffstat (limited to 'src')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 432cd329..004da9d0 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -148,19 +148,9 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj connect(this, &TimelineModel::messageSent, this, [this](QString txn_id, QString event_id) { pending.removeOne(txn_id); - // we could have received the message via sync - if (events.contains(event_id)) { - int idx = idToIndex(event_id); - if (idx >= 0) { - beginRemoveRows(QModelIndex(), idx, idx); - eventOrder.erase(eventOrder.begin() + idx); - endRemoveRows(); - } - } - int idx = idToIndex(txn_id); if (idx < 0) { - nhlog::ui()->warn("Sent index out of range"); + // transaction already received via sync return; } eventOrder[idx] = event_id; |