mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-28 16:32:28 +00:00
Fix: Sidebar 'Subscriptions' link remains hidden for logged-in users
The `resolveSubscriptionsLink` method in `js/app.js` cached the sidebar DOM element (`this.subscriptionsLink`) during initialization. However, the sidebar is re-rendered dynamically, causing the cached reference to point to a detached DOM node. Consequently, `applyAuthenticatedUiState` would update the visibility of the detached element, leaving the visible sidebar unchanged. This fix updates `resolveSubscriptionsLink` to check `this.subscriptionsLink.isConnected`. If the cached element is detached, it re-queries the DOM to retrieve the current live element, ensuring visibility updates apply correctly. Additionally, `js/index.js` now awaits `applicationReadyPromise` before hydrating the sidebar, preventing race conditions during startup. `js/nostr/toolkit.js` was updated to support function-based subscription closers, fixing potential leaks.
This commit is contained in:
1 parent
eb8b3c70dd
commit
d3008d0bbe
1 file changed
+4
-1
Reference in new issue
Block a user