Fix: Ensure UI refreshes upon trusted seed updates

Subscribes `js/app.js` to `moderationService` events (`trusted-mutes`, `user-blocks`, `summary`). This ensures that asynchronous updates to trusted seed block lists (Kind 10000) trigger an immediate UI refresh, correctly applying moderation (blur/hide) even for anonymous session actors who rely on these seeds. Previously, the initial render would complete before the async lists arrived, leaving blocked content visible until a page reload.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-10 21:37:43 +00:00
1 parent 966a7810cb
commit dc476392b2
1 file changed
+12
+12
View File
@@ -2651,6 +2651,18 @@ class Application {
* Setup general event listeners for logout, modals, etc.
*/
setupEventListeners() {
if (moderationService && typeof moderationService.on === "function") {
moderationService.on("trusted-mutes", () => {
this.refreshVisibleModerationUi({ reason: "trusted-mutes" });
});
moderationService.on("user-blocks", () => {
this.refreshVisibleModerationUi({ reason: "user-blocks" });
});
moderationService.on("summary", () => {
this.refreshVisibleModerationUi({ reason: "moderation-summary" });
});
}
if (this.appChromeController) {
this.appChromeController.initialize();
return;