feat: do not initiate requests when the SearchModal is not open to speed up page loading

This commit is contained in:
Shirasawa
2025-09-22 12:01:29 +08:00
committed by GitHub
parent fb3b736a35
commit 01fcd057b7
+2 -4
View File
@@ -149,9 +149,9 @@
chatListLoading = false;
};
const init = () => {
$: if (show) {
searchHandler();
};
}
const onKeyDown = (e) => {
const searchOptions = document.getElementById('search-options-container');
@@ -205,8 +205,6 @@
};
onMount(() => {
init();
document.addEventListener('keydown', onKeyDown);
});