mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 03:12:31 +00:00
fix: ensure active feed refreshes when hashtag preferences change
* Update `refreshAllVideoGrids` in `js/app.js` to detect the currently active feed (For You, Kids, Explore, or Recent) and invoke the corresponding loader, preventing staleness when interacting with the UI. * Refactor `HashtagPreferencesService` mutation methods (`addInterest`, etc.) to be `async` and await the `publish()` call, ensuring state is persisted before returning. * Remove redundant `persistPreferencesFromMenu` call in `TagPreferenceMenuController`, relying on the service's internal persistence logic. * Update unit tests for `HashtagPreferencesService` and `TagPreferenceMenuController` to align with the async behavior. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
71e0ecd605
commit
f77c89baf6
5 files changed
+44
-38
No files matched your search
@@ -276,16 +276,6 @@ export default class TagPreferenceMenuController {
|
||||
this.callbacks.onPreferenceUpdate();
|
||||
}
|
||||
|
||||
try {
|
||||
await this.persistPreferencesFromMenu();
|
||||
} catch (error) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.callbacks.onPreferenceUpdate) {
|
||||
this.callbacks.onPreferenceUpdate();
|
||||
}
|
||||
|
||||
if (typeof detail?.closePopover === "function") {
|
||||
detail.closePopover({ restoreFocus: false });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user