Skip to content

Commit ee9db91

Browse files
committed
refac
1 parent 09f6d7b commit ee9db91

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/lib/components/chat/Chat.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,8 +1232,13 @@
12321232
desktopEvent.set(null);
12331233
12341234
if (event.type === 'call') {
1235-
showCallOverlay.set(true);
1236-
showControls.set(true);
1235+
// Defer to next macrotask so the call overlay isn't clobbered by
1236+
// showControlsSubscribe's initial callback (value=false → set(false))
1237+
// which runs as a pending microtask after this function.
1238+
setTimeout(() => {
1239+
showCallOverlay.set(true);
1240+
showControls.set(true);
1241+
}, 0);
12371242
} else if (event.type === 'query') {
12381243
const query = event.data?.query;
12391244
const eventFiles = event.data?.files;

0 commit comments

Comments
 (0)