mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-04 20:02:26 +00:00
Merge pull request #1171 from PR0M3TH3AN/fix-trusted-seed-reactivity-3260312645150646565
Fix: React to trusted seed block list updates for session actors
This commit is contained in:
1 file changed
+32
-1
@@ -328,7 +328,22 @@ class Application {
|
||||
isAuthorBlocked(pubkey) {
|
||||
try {
|
||||
if (userBlocks && typeof userBlocks.isBlocked === "function") {
|
||||
return userBlocks.isBlocked(pubkey);
|
||||
if (userBlocks.isBlocked(pubkey)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.isUserLoggedIn()) {
|
||||
const normalized = this.normalizeHexPubkey(pubkey);
|
||||
if (
|
||||
normalized &&
|
||||
moderationService &&
|
||||
typeof moderationService.isAuthorMutedByTrusted === "function"
|
||||
) {
|
||||
if (moderationService.isAuthorMutedByTrusted(normalized)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
devLogger.warn("[Application] Failed to evaluate block status:", error);
|
||||
@@ -2651,6 +2666,22 @@ class Application {
|
||||
* Setup general event listeners for logout, modals, etc.
|
||||
*/
|
||||
setupEventListeners() {
|
||||
if (moderationService && typeof moderationService.on === "function") {
|
||||
moderationService.on("trusted-mutes", () => {
|
||||
if (!this.isUserLoggedIn()) {
|
||||
this.refreshAllVideoGrids({ reason: "trusted-mutes" });
|
||||
} else {
|
||||
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;
|
||||
|
||||
Reference in new issue
Block a user