mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
copilot: Fix double lease panic when signing out (#46619)
Extracted out of #46618 as I wanna fast-track it to Preview. Release Notes: - Fixed a crash that occured when signing out of Copilot.
This commit is contained in:
parent
2f093d23ae
commit
0eeb743904
1 changed files with 6 additions and 4 deletions
|
|
@ -89,10 +89,12 @@ fn copilot_toast(message: Option<&'static str>, window: &Window, cx: &mut App) {
|
|||
return;
|
||||
};
|
||||
|
||||
workspace.update(cx, |workspace, cx| match message {
|
||||
Some(message) => workspace.show_toast(Toast::new(NOTIFICATION_ID, message), cx),
|
||||
None => workspace.dismiss_toast(&NOTIFICATION_ID, cx),
|
||||
});
|
||||
cx.defer(move |cx| {
|
||||
workspace.update(cx, |workspace, cx| match message {
|
||||
Some(message) => workspace.show_toast(Toast::new(NOTIFICATION_ID, message), cx),
|
||||
None => workspace.dismiss_toast(&NOTIFICATION_ID, cx),
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
pub fn initiate_sign_in_impl(is_reinstall: bool, window: &mut Window, cx: &mut App) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue