mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-02 00:31:45 +00:00
195316b8bf
The previous fix moved the chat-list indicator totals into a SubsStatusModel singleton on the theory that frequent toolbar rebuilds recreate the view and reset its @State. That theory is unverified (in SwiftUI @State is tied to view identity, not struct recreation), so the fix may mask the symptom without addressing the cause. Revert to the original @State-based SubsStatusIndicator and instead add SUBS_TRACE logging along the full data path to observe the real root cause: - getAgentSubsTotal(): raw totals returned by the core each poll - view init: whether/how often the struct is recreated - onAppear/onDisappear: whether view identity is churning - poll loop: gating (appActive/chatRunning), fetched values, @State write - body: the subs/hasSess actually rendered (flags the empty share-unknown state)