MateriiApps / OpenCord

An open-source Material You implementation of the Discord Android app
GNU General Public License v3.0
1.24k stars 99 forks source link

refactor: navigation, viewmodels and stores #103

Closed X1nto closed 1 year ago

X1nto commented 1 year ago

Currently, stores rely on our custom Event class, which is very unreliable when new subscribers try to observe old data. Instead of creating events, this PR makes use of Room's Flow observables to provide the latest data. Alongside that, stores now sort the data before they're emitted to viewmodel, which decreases the UI overhead since compose now doesn't need to sort channels and guilds manually.

rushiiMachine commented 1 year ago

unnecessary anymore