mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 20:32:27 +00:00
Fix profile watch history and subscription lists syncing issues.
This commit is contained in:
1 parent
9d365bf65e
commit
19dd570607
2 files changed
+42
-22
No files matched your search
@@ -1156,6 +1156,20 @@ export class ProfileModalController {
|
||||
throw new Error("profile modal container missing");
|
||||
}
|
||||
|
||||
// Invalidate any stale renderer reference so it is recreated
|
||||
// with the freshly loaded DOM elements.
|
||||
if (this.profileHistoryRenderer) {
|
||||
try {
|
||||
if (typeof this.profileHistoryRenderer.destroy === "function") {
|
||||
this.profileHistoryRenderer.destroy();
|
||||
}
|
||||
} catch (err) {
|
||||
devLogger.warn("[profileModal] Failed to destroy stale history renderer:", err);
|
||||
}
|
||||
this.profileHistoryRenderer = null;
|
||||
this.profileHistoryRendererConfig = null;
|
||||
}
|
||||
|
||||
const response = await fetch("components/profile-modal.html");
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to load profile modal HTML (${response.status})`);
|
||||
@@ -1460,7 +1474,10 @@ export class ProfileModalController {
|
||||
const config = this.getProfileHistoryRendererConfig();
|
||||
|
||||
try {
|
||||
this.profileHistoryRenderer = this.createWatchHistoryRenderer(config);
|
||||
this.profileHistoryRenderer = this.createWatchHistoryRenderer({
|
||||
...config,
|
||||
container: this.profileModalPanel || this.profileModalRoot,
|
||||
});
|
||||
} catch (error) {
|
||||
userLogger.error(
|
||||
"[profileModal] Failed to create watch history renderer:",
|
||||
|
||||
Reference in new issue
Block a user