Open krille-chan opened 9 months ago
Could be related to an edge case that a message doesn't appear on all devices. Wrote a message on web. That message was missing on my mobile phone until I answered to my own message and tapped on the reply event content on my phone.
Preflight Checklist
Describe your problem
The current implementation is a drop-in-replacement for Hive. But it could need some refactoring and improvements.
Describe your ideal solution
With IndexedDB and SQFlite we can implement easy queries to improve performance at some places. Then we might be able to eliminate the cache in the key/value box implementations so that at the end we could have code which is simpler to read, more performant and reduce the code base at all.
For queries we could create indezes for indexedDB in the openbox method:
And then implement a query method like this (could also need direction parameter):
For the sqflite backend we could use JSON functions to implement something similar: https://www.sqlite.org/json1.html
Then we may can get rid of the timeline box which stores only event IDs in a row and just rely on the sort order in the database.
Version
No response
Security requirements
No response
Additional Context
No response