Fix flickering of encrypted messages when sending using new store

This commit is contained in:
Nicolas Werner 2020-07-18 19:15:50 +02:00
parent a5dda86a6c
commit 36e4405f25

View file

@ -776,6 +776,7 @@ TimelineModel::sendEncryptedMessage(const std::string txn_id, nlohmann::json con
event.room_id = room_id;
event.sender = http::client()->user_id().to_string();
event.type = mtx::events::EventType::RoomEncrypted;
event.origin_server_ts = QDateTime::currentMSecsSinceEpoch();
emit this->addPendingMessageToStore(event);
return;
@ -815,6 +816,7 @@ TimelineModel::sendEncryptedMessage(const std::string txn_id, nlohmann::json con
event.room_id = room_id;
event.sender = http::client()->user_id().to_string();
event.type = mtx::events::EventType::RoomEncrypted;
event.origin_server_ts = QDateTime::currentMSecsSinceEpoch();
emit this->addPendingMessageToStore(event);
} catch (const lmdb::error &e) {