Keep collab panel focused after deleting a channel
This commit is contained in:
parent
a56747af8c
commit
706227701e
1 changed files with 2 additions and 1 deletions
|
@ -2167,7 +2167,7 @@ impl CollabPanel {
|
|||
let mut answer =
|
||||
cx.prompt(PromptLevel::Warning, &prompt_message, &["Remove", "Cancel"]);
|
||||
let window = cx.window();
|
||||
cx.spawn(|_, mut cx| async move {
|
||||
cx.spawn(|this, mut cx| async move {
|
||||
if answer.next().await == Some(0) {
|
||||
if let Err(e) = channel_store
|
||||
.update(&mut cx, |channels, _| channels.remove_channel(channel_id))
|
||||
|
@ -2180,6 +2180,7 @@ impl CollabPanel {
|
|||
&mut cx,
|
||||
);
|
||||
}
|
||||
this.update(&mut cx, |_, cx| cx.focus_self()).ok();
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue