From 2dd896044ca40fa5bb75be3f40c6ae693e1eab9e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 18 Jan 2026 16:44:06 +0000 Subject: [PATCH] fix: ensure hashtag preferences load on login When a user logs in, `profileCache` emits a `profileChanged` event. Previously, `HashtagPreferencesService` only reset its state on this event, failing to fetch the new user's preferences. This commit updates the subscription handler to call `load(pubkey)` when a new profile is set, ensuring interests and disinterests are reliably synchronized. --- js/services/hashtagPreferencesService.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/services/hashtagPreferencesService.js b/js/services/hashtagPreferencesService.js index 6984bdd6..86c6a1bb 100644 --- a/js/services/hashtagPreferencesService.js +++ b/js/services/hashtagPreferencesService.js @@ -250,6 +250,9 @@ class HashtagPreferencesService { profileCache.subscribe((event, detail) => { if (event === "profileChanged") { this.reset(); + if (detail.pubkey) { + this.load(detail.pubkey); + } } else if (event === "runtimeCleared" && detail.pubkey === this.activePubkey) { this.reset(); if (this.activePubkey) {