Fully support an "offline" mode: show previously-cached content without needing to login.
- [x] Can view joined rooms
- [x] can view previous messages
The functionality for doing this properly was just merged into the matrix-rust-sdk today, so we can migrate to that version and start working on this again.
#445 enabled offline usage of the event cache, but we still don't have a way to allow the user to start Robrix in an offline state and view messages from a previously-cached session. Currently, Robrix requires a successful login/re-login before showing the main room content, so there isn't a way to view previously-cached content if you start Robrix without a working internet connection. We need to remove that requirement.
#445 enabled offline usage of the event cache, but we still don't have a way to allow the user to start Robrix in an offline state and view messages from a previously-cached session. Currently, Robrix requires a successful login/re-login before showing the main room content, so there isn't a way to view previously-cached content if you start Robrix without a working internet connection. We need to remove that requirement.
Currently in offline mode, the login is auto and it restores its previous session. Do you mean to hide the UI of Login modal which restores of the session?
Currently in offline mode, the login is auto and it restores its previous session. Do you mean to hide the UI of Login modal which restores of the session?
Yes, i meant that we should hide the login screen if we're offline but have restored the content of a previous from the event cache. This would allow the user to read the cached content while offline without having to login at all.
However, if you're saying that the login process can succeed while offline, then we don't need to do this. Is that the case? I presumed that the login flow required an active internet connection.
This currently seems to work even when offline, but only some of the previously-loaded rooms are available. For example, my main account has 70 joined rooms, but when I open Robrix while offline, it only ever shows 15-20 rooms.
@alanpoon do you have any idea for how to fix that? if not, we can (1) attempt to upgrade to the latest matrix-rust-sdk version to see if that fixes it, or (2) reach out to the Matrix Rust SDK room for help.