You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Robrix does not save any app state to persistent storage. Thus, all data displayed by Robrix must be re-fetched from scratch every time the app is started. Obviously this is not suitable for a real usable app that would be installed on actual user devices.
In the Moxin app, I used the directories crate to store persistent application data to (and read it back from) the canonical directories for app data, cached data, preferences/settings/config data, etc. See the PR here: moxin-org/moly#96
The ability to save and restore Matrix SDK state is required for properly handling login tokens (sessions), E2EE tokens
Unknowns
One complication is that the Matrix SDK itself wants to implicitly handle saving and restoring its internal state (e.g., timeline content, etc).
So we don't necessarily have full direct control over all states that are persisted to storage.
I'm not sure what internal states that the Matrix SDK Client manages (and other session data) are capable of being saved/restored to disk. Furthermore, I'm not sure which Matrix SDK APIs should be used to actually trigger the saving or restoring action. Things are a bit opaque and not well documented.
Currently Robrix does not save any app state to persistent storage. Thus, all data displayed by Robrix must be re-fetched from scratch every time the app is started. Obviously this is not suitable for a real usable app that would be installed on actual user devices.
In the Moxin app, I used the
directories
crate to store persistent application data to (and read it back from) the canonical directories for app data, cached data, preferences/settings/config data, etc. See the PR here: moxin-org/moly#96The ability to save and restore Matrix SDK state is required for properly handling login tokens (sessions), E2EE tokens
Unknowns
One complication is that the Matrix SDK itself wants to implicitly handle saving and restoring its internal state (e.g., timeline content, etc).
So we don't necessarily have full direct control over all states that are persisted to storage.
I'm not sure what internal states that the Matrix SDK
Client
manages (and other session data) are capable of being saved/restored to disk. Furthermore, I'm not sure which Matrix SDK APIs should be used to actually trigger the saving or restoring action. Things are a bit opaque and not well documented.Examples
Thankfully, the Matrix SDK does provide one example of how to persist internal session data.
https://github.com/matrix-org/matrix-rust-sdk/blob/main/examples/persist_session/src/main.rs
This should provide a good baseline for where to start on implementing app data persistence.
The text was updated successfully, but these errors were encountered: