fix: await initApp() + fulltextSearch for reliable restore

This commit is contained in:
Accusys
2026-05-22 10:58:53 +08:00
parent bc04d1c44a
commit 600ce8e964

View File

@@ -261,7 +261,7 @@ window.doLogin = async function() {
var p = document.getElementById('login-pass').value;
if (await loginUser(u, p)) {
document.getElementById('sidebar').style.display = 'flex';
initApp();
await initApp();
} else {
document.getElementById('login-err').style.display = 'block';
}
@@ -347,7 +347,7 @@ async function initApp() {
moduleListEl.style.display = 'none';
searchResultsEl.style.display = 'block';
searchResultsEl.innerHTML = '<p style="font-size:13px;color:#888">Restoring search...</p>';
fulltextSearch(savedQ);
await fulltextSearch(savedQ);
} else {
// Load initial module from hash or default
var hash = location.hash.slice(1);