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.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-18 16:44:06 +00:00
1 parent f5eb90cc84
commit 2dd896044c
1 file changed
+3
+3
View File
@@ -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) {