From 66310ca3364c880d1424811dd8595ab135546a16 Mon Sep 17 00:00:00 2001 From: nrobi144 Date: Tue, 28 Apr 2026 15:00:21 +0300 Subject: [PATCH] fix(multi-account): reset lastContactListCreatedAt on cache clear Root cause of 'follows at 0 after 2+ switches': DesktopLocalCache.clear() reset _followedUsers to empty but did NOT reset lastContactListCreatedAt. On re-subscribe after account switch, the contact list event arrived with the same timestamp, was rejected by the 'event.createdAt <= lastContactListCreatedAt' guard, and followedUsers stayed empty. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../vitorpamplona/amethyst/desktop/cache/DesktopLocalCache.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/cache/DesktopLocalCache.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/cache/DesktopLocalCache.kt index e69a55272..08b57e10e 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/cache/DesktopLocalCache.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/cache/DesktopLocalCache.kt @@ -612,6 +612,7 @@ class DesktopLocalCache : ICacheProvider { _followedUsers.value = emptySet() followerCounts.clear() followingCounts.clear() + lastContactListCreatedAt = 0L } }