mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
Merge pull request #1202 from PR0M3TH3AN/fix-subscriptions-loading-and-sidebar-visibility-15759455493228740300
Fix subscriptions loading and sidebar visibility
This commit is contained in:
3 files changed
+15
-2
No files matched your search
@@ -3866,7 +3866,10 @@ class Application {
|
||||
}
|
||||
|
||||
resolveSubscriptionsLink() {
|
||||
if (this.subscriptionsLink instanceof HTMLElement) {
|
||||
if (
|
||||
this.subscriptionsLink instanceof HTMLElement &&
|
||||
this.subscriptionsLink.isConnected
|
||||
) {
|
||||
return this.subscriptionsLink;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user