quotient-im / libQuotient

A Qt library to write cross-platform clients for Matrix
https://quotient-im.github.io/libQuotient/
GNU Lesser General Public License v2.1
132 stars 56 forks source link

Keep cache of messages in database #774

Open TobiasFella opened 1 month ago

TobiasFella commented 1 month ago

Improves startup time, general UX, allows for client-side message search in the future, ... While increasing requiring more storage on the client, of course.

There are some TODOs left in the code for things that need to be implemented and figured out

TobiasFella commented 1 month ago

I think this is ready. Please also check whether this is conceptionally sound

TobiasFella commented 1 month ago

This is only solid because the stored messages for each room are guaranteed not to have any missing chunks between them (historical messages always come in starting from the oldest known message and new syncs always bring all new messages). If this ever changes (sliding sync?), this would probably get a whole lot messier

TobiasFella commented 1 month ago

allHistoryLoaded needs to be adapted

TobiasFella commented 1 month ago

allHistoryLoaded needs to be adapted

Done