mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-01 02:12:26 +00:00
Refresh feeds on admin blacklist changes for guests
This commit is contained in:
1 parent
e5d2d923de
commit
4a4ffa45b4
1 file changed
+25
@@ -513,6 +513,31 @@ class Application {
|
||||
if (typeof accessControl.onBlacklistChange === "function") {
|
||||
accessControl.onBlacklistChange(() => {
|
||||
syncSessionActorBlacklist("blacklist-change");
|
||||
if (this.isUserLoggedIn()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const refreshReason = "admin-blacklist-change";
|
||||
this.refreshAllVideoGrids({
|
||||
reason: refreshReason,
|
||||
forceMainReload: true,
|
||||
}).catch((error) => {
|
||||
devLogger.warn(
|
||||
"[app.init()] Failed to refresh video grids after admin blacklist change:",
|
||||
error,
|
||||
);
|
||||
});
|
||||
|
||||
if (typeof this.refreshVisibleModerationUi === "function") {
|
||||
try {
|
||||
this.refreshVisibleModerationUi({ reason: refreshReason });
|
||||
} catch (error) {
|
||||
devLogger.warn(
|
||||
"[app.init()] Failed to refresh moderation UI after admin blacklist change:",
|
||||
error,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user