UltimateGG / zentrix

Preact & Capacitor real time chat app
2 stars 0 forks source link

Offline support #5

Closed UltimateGG closed 1 year ago

UltimateGG commented 1 year ago

The "cache" is just a react context which is destroyed on reload. Abstract one layer down to the chrome API. When populated, pull from here initially (Still try network request) So offline shows this possibly out of date data first, but makes the user not as angry >:( Every time the context is updated write to this cache again.

Also make sure when writing to the disk that messages arrays are not > x amount. The user should be able to load a lot of messages into memory, but maybe only 200 per chat when reloading or offline use.

UltimateGG commented 1 year ago

Probably pretty buggy but I will close this now