This commit is contained in:
Timothy Jaeryang Baek committed 2026-08-24 17:39:30 -04:00
1 parent f2313d0c72
commit 8c1f3d3824
1 file changed
+9 -9
+9 -9
View File
@@ -1989,6 +1989,13 @@
// Web functions // Web functions
////////////////////////// //////////////////////////
const openCallOverlay = () => {
setTimeout(() => {
showCallOverlay.set(true);
showControls.set(true);
}, 0);
};
const initNewChat = async () => { const initNewChat = async () => {
console.log('initNewChat'); console.log('initNewChat');
resetWebSearchConfirmation(); resetWebSearchConfirmation();
@@ -2176,8 +2183,7 @@
} }
if ($page.url.searchParams.get('call') === 'true') { if ($page.url.searchParams.get('call') === 'true') {
showCallOverlay.set(true); openCallOverlay();
showControls.set(true);
} }
// Consume one-shot desktop event (e.g. Spotlight query, call shortcut) // Consume one-shot desktop event (e.g. Spotlight query, call shortcut)
@@ -2186,13 +2192,7 @@
desktopEvent.set(null); desktopEvent.set(null);
if (event.type === 'call') { if (event.type === 'call') {
// Defer to next macrotask so the call overlay isn't clobbered by openCallOverlay();
// showControlsSubscribe's initial callback (value=false → set(false))
// which runs as a pending microtask after this function.
setTimeout(() => {
showCallOverlay.set(true);
showControls.set(true);
}, 0);
} else if (event.type === 'query') { } else if (event.type === 'query') {
const query = event.data?.query; const query = event.data?.query;
const eventFiles = event.data?.files; const eventFiles = event.data?.files;