v0.7.15 - Fixed race condition in subscription management causing intermittent core dumps and format truncation warning

This commit is contained in:
Your Name
2025-10-14 11:34:55 -04:00
parent 670329700c
commit 29680f0ee8
8 changed files with 77 additions and 53 deletions

View File

@@ -174,7 +174,7 @@
<!-- DATABASE STATISTICS Section -->
<div class="section">
<div class="section" id="databaseStatisticsSection" style="display: none;">
<div class="section-header">
<h2>DATABASE STATISTICS</h2>
</div>

View File

@@ -607,11 +607,13 @@
function updateAdminSectionsVisibility() {
const divConfig = document.getElementById('div_config');
const authRulesSection = document.getElementById('authRulesSection');
const databaseStatisticsSection = document.getElementById('databaseStatisticsSection');
const nip17DMSection = document.getElementById('nip17DMSection');
const shouldShow = isLoggedIn && isRelayConnected;
if (divConfig) divConfig.style.display = shouldShow ? 'block' : 'none';
if (authRulesSection) authRulesSection.style.display = shouldShow ? 'block' : 'none';
if (databaseStatisticsSection) databaseStatisticsSection.style.display = shouldShow ? 'block' : 'none';
if (nip17DMSection) nip17DMSection.style.display = shouldShow ? 'block' : 'none';
}
@@ -2131,7 +2133,7 @@
const originalShowMainInterface = showMainInterface;
showMainInterface = function () {
originalShowMainInterface();
showAuthRulesSection();
// Removed showAuthRulesSection() call - visibility now handled by updateAdminSectionsVisibility()
};
// Auth rules event handlers
@@ -3532,6 +3534,9 @@
// Initialize login/logout button state
updateLoginLogoutButton();
// Ensure admin sections are hidden by default on page load
updateAdminSectionsVisibility();
setTimeout(() => {
initializeApp();
// Enhance SimplePool for testing after initialization