mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
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:
1 parent
f5eb90cc84
commit
2dd896044c
1 file changed
+3
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user