fix(cache): don't reset followersCount to 0 on subscription restart

Cached value now stays visible until relay data exceeds it, preventing
the count jumping from cached→0→ticking back up on each navigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
nrobi144
2026-03-23 14:31:59 +02:00
parent f2169e0236
commit f27c8811d5
@@ -307,9 +307,8 @@ fun UserProfileScreen(
// Subscribe to followers (contact lists that tag this user)
rememberSubscription(connectedRelays, pubKeyHex, retryTrigger, relayManager = relayManager) {
if (connectedRelays.isNotEmpty()) {
// Clear previous followers when subscription restarts
// Clear dedup set but keep cached followersCount visible until new data arrives
followerAuthors.clear()
followersCount = 0
SubscriptionConfig(
subId = "followers-${pubKeyHex.take(8)}-${System.currentTimeMillis()}",