Replace ViewContext::spawn with ViewContext::spawn_weak

This commit is contained in:
Antonio Scandurra 2023-04-26 10:23:27 +02:00
parent 09f7e41907
commit 94c2eaad23
20 changed files with 83 additions and 73 deletions

View file

@ -245,7 +245,7 @@ impl ScrollManager {
}
if cx.default_global::<ScrollbarAutoHide>().0 {
self.hide_scrollbar_task = Some(cx.spawn_weak(|editor, mut cx| async move {
self.hide_scrollbar_task = Some(cx.spawn(|editor, mut cx| async move {
cx.background().timer(SCROLLBAR_SHOW_INTERVAL).await;
if let Some(editor) = editor.upgrade(&cx) {
editor