Merge branch 'main' into collab-panel

This commit is contained in:
Mikayla 2023-08-09 10:37:22 -07:00
commit 99daa73325
No known key found for this signature in database
93 changed files with 1908 additions and 1442 deletions

View file

@ -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,
);
}
}