project-robius / robrix

A multi-platform Matrix chat client written in pure Rust using the Makepad UI toolkit and the Robius app dev framework
MIT License
96 stars 18 forks source link

Save and restore event cache to/from persistent storage #164

Open kevinaboos opened 1 month ago

kevinaboos commented 1 month ago

Now that a user's login session is properly persisted to/from storage on all platforms, the next step is to:

  1. Serialize the actual set of all timeline events (as a list of SyncTimelineEvents) upon app exit, or perhaps upon another lifecycle stage.
  2. Deserialize them and repopulate the event cache before synchronizing any timelines, using the EventCache::add_initial_events()
    • We just removed an erroneous invocation of this function in fde5d29711363f49fdc3503125a90522bffac677
kevinaboos commented 2 days ago

This is blocked on the Matrix Rust SDK, which currently doesn't fully implement EventCache features that allow the client to customize how events are extracted from and imported into the cache.