pachli / pachli-android

The Pachli Android app
https://pachli.app
GNU General Public License v3.0
132 stars 15 forks source link

fix: Prevent crash when showing account chooser #1117

Closed nikclayton closed 2 days ago

nikclayton commented 2 days ago

Chooser dialog could start before any accounts have loaded. Fix by collecting the account flow and waiting for the first emission (convert the flow to shared instead of state so there's no initial empty list).

Guard against the potential for a similar issue when fetching notifications.

Order the list of accounts with active account first so that code that skips it by ignoring the first item works correctly.