Merge pull request #1202 from PR0M3TH3AN/fix-subscriptions-loading-and-sidebar-visibility-15759455493228740300

Fix subscriptions loading and sidebar visibility
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-13 12:06:21 -05:00
commit 03bdc7a695
3 files changed
+15 -2

No files matched your search

+4 -1
View File
@@ -3866,7 +3866,10 @@ class Application {
}
resolveSubscriptionsLink() {
if (this.subscriptionsLink instanceof HTMLElement) {
if (
this.subscriptionsLink instanceof HTMLElement &&
this.subscriptionsLink.isConnected
) {
return this.subscriptionsLink;
}
+6
View File
@@ -621,6 +621,12 @@ async function bootstrapInterface() {
await loadSidebar("components/sidebar.html", "sidebarContainer");
devLogger.log("Sidebar loaded.");
try {
await applicationReadyPromise;
} catch (error) {
// fall through
}
if (application && typeof application.hydrateSidebarNavigation === "function") {
try {
application.hydrateSidebarNavigation();
+5 -1
View File
@@ -522,7 +522,11 @@ export function shimLegacySimplePoolMethods(pool) {
}
closed = true;
try {
closer?.close?.("closed by caller");
if (typeof closer === "function") {
closer();
} else if (closer && typeof closer.close === "function") {
closer.close("closed by caller");
}
} catch (error) {
devLogger.warn("[nostr] Failed to close SimplePool subscription.", error);
}