Merge branch 'main' into collab-panel
This commit is contained in:
commit
99daa73325
93 changed files with 1908 additions and 1442 deletions
|
@ -1891,18 +1891,18 @@ impl CollabPanel {
|
|||
);
|
||||
let mut answer =
|
||||
cx.prompt(PromptLevel::Warning, &prompt_message, &["Remove", "Cancel"]);
|
||||
let window_id = cx.window_id();
|
||||
let window = cx.window();
|
||||
cx.spawn(|_, 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))
|
||||
.await
|
||||
{
|
||||
cx.prompt(
|
||||
window_id,
|
||||
window.prompt(
|
||||
PromptLevel::Info,
|
||||
&format!("Failed to remove channel: {}", e),
|
||||
&["Ok"],
|
||||
&mut cx,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1921,18 +1921,18 @@ impl CollabPanel {
|
|||
github_login
|
||||
);
|
||||
let mut answer = cx.prompt(PromptLevel::Warning, &prompt_message, &["Remove", "Cancel"]);
|
||||
let window_id = cx.window_id();
|
||||
let window = cx.window();
|
||||
cx.spawn(|_, mut cx| async move {
|
||||
if answer.next().await == Some(0) {
|
||||
if let Err(e) = user_store
|
||||
.update(&mut cx, |store, cx| store.remove_contact(user_id, cx))
|
||||
.await
|
||||
{
|
||||
cx.prompt(
|
||||
window_id,
|
||||
window.prompt(
|
||||
PromptLevel::Info,
|
||||
&format!("Failed to remove contact: {}", e),
|
||||
&["Ok"],
|
||||
&mut cx,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue