Continue fetching past messages when searching

This commit is contained in:
Nicolas Werner 2022-11-03 23:26:59 +01:00
parent 56a4e97296
commit 76347f1c6f
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
6 changed files with 94 additions and 54 deletions

View file

@ -80,8 +80,8 @@ EventStore::EventStore(std::string room_id, QObject *)
emit beginInsertRows(toExternalIdx(newFirst), toExternalIdx(this->first - 1));
this->first = newFirst;
emit endInsertRows();
emit fetchedMore();
emit dataChanged(toExternalIdx(oldFirst), toExternalIdx(oldFirst));
emit fetchedMore();
} else {
auto range = cache::client()->getTimelineRange(room_id_);
@ -725,10 +725,11 @@ EventStore::decryptEvent(const IdIndex &idx,
case olm::DecryptionErrorCode::ParsingFailed:
break;
case olm::DecryptionErrorCode::ReplayAttack:
nhlog::crypto()->critical("Reply attack while decryptiong event {} in room {} from {}!",
e.event_id,
room_id_,
e.sender);
nhlog::crypto()->critical(
"Replay attack while decryptiong event {} in room {} from {}!",
e.event_id,
room_id_,
e.sender);
break;
case olm::DecryptionErrorCode::NoError:
// unreachable