Pass WindowContext to ViewHandle::is_focused

This commit is contained in:
Antonio Scandurra 2023-04-14 12:12:08 +02:00
parent 74ca223114
commit 98dce89379
3 changed files with 8 additions and 9 deletions

View file

@ -161,7 +161,7 @@ impl View for CopilotButton {
));
let window_id = cx.window_id();
let task = task.to_owned();
cx.spawn(|this, mut cx| async move {
cx.spawn_weak(|_this, mut cx| async move {
task.await;
cx.update(|cx| {
if let Some(copilot) = Copilot::global(cx) {