mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 03:18:23 +00:00
Profile metadata (kind 0) was fetched by a single app-wide ProfileSubscription that only ever tracked the current logged-in account and was started/stopped by the process lifecycle. Composables showing other accounts (account switcher, login picker, backup screens) only read stale data from SharedPreferences and never refreshed. Make ProfileSubscription account-scoped: updateFilter(account) / closeSub(account) track per-account state in a hexKey->Account map so incoming events update the matching cached account's StateFlows. Composables now start/stop their own fetch via a new ProfileSubscriptionEffect, and AccountsBottomSheet loads real Account objects so refreshed metadata shows live. Remove the app-wide foreground/background driver and the scattered current-account updateFilter() calls; relay-list changes now refresh all tracked accounts via updateFilters(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013uUuFVywrRuSNKNKsK32Pv