Fix joining descendant channels, style channel invites

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Max Brunsfeld 2023-08-04 16:14:01 -07:00
parent 87b2d599c1
commit 2ccd153233
8 changed files with 260 additions and 193 deletions

View file

@ -487,7 +487,7 @@ impl ChannelModalDelegate {
});
cx.spawn(|picker, mut cx| async move {
update.await?;
picker.update(&mut cx, |picker, cx| {
picker.update(&mut cx, |picker, _| {
let this = picker.delegate_mut();
if let Some(member) = this.members.iter_mut().find(|m| m.user.id == user_id) {
member.admin = admin;
@ -503,7 +503,7 @@ impl ChannelModalDelegate {
});
cx.spawn(|picker, mut cx| async move {
update.await?;
picker.update(&mut cx, |picker, cx| {
picker.update(&mut cx, |picker, _| {
let this = picker.delegate_mut();
if let Some(ix) = this.members.iter_mut().position(|m| m.user.id == user_id) {
this.members.remove(ix);