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:
+1
-2
@@ -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()}",
|
||||
|
||||
Reference in New Issue
Block a user