mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Fix removal of followers on Unfollow
This commit is contained in:
parent
e9c1ad6acd
commit
38a9e6fde1
1 changed files with 3 additions and 3 deletions
|
@ -95,7 +95,7 @@ impl ActiveCall {
|
||||||
client.add_message_handler(cx.handle(), Self::handle_call_canceled),
|
client.add_message_handler(cx.handle(), Self::handle_call_canceled),
|
||||||
client.add_request_handler(cx.handle(), Self::handle_follow),
|
client.add_request_handler(cx.handle(), Self::handle_follow),
|
||||||
client.add_message_handler(cx.handle(), Self::handle_unfollow),
|
client.add_message_handler(cx.handle(), Self::handle_unfollow),
|
||||||
client.add_message_handler(cx.handle(), Self::handle_update_followers),
|
client.add_message_handler(cx.handle(), Self::handle_update_from_leader),
|
||||||
],
|
],
|
||||||
client,
|
client,
|
||||||
user_store,
|
user_store,
|
||||||
|
@ -259,14 +259,14 @@ impl ActiveCall {
|
||||||
project_id: envelope.payload.project_id,
|
project_id: envelope.payload.project_id,
|
||||||
peer_id: envelope.original_sender_id()?,
|
peer_id: envelope.original_sender_id()?,
|
||||||
};
|
};
|
||||||
if let Err(ix) = this.followers.binary_search(&follower) {
|
if let Ok(ix) = this.followers.binary_search(&follower) {
|
||||||
this.followers.remove(ix);
|
this.followers.remove(ix);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_update_followers(
|
async fn handle_update_from_leader(
|
||||||
this: ModelHandle<Self>,
|
this: ModelHandle<Self>,
|
||||||
envelope: TypedEnvelope<proto::UpdateFollowers>,
|
envelope: TypedEnvelope<proto::UpdateFollowers>,
|
||||||
_: Arc<Client>,
|
_: Arc<Client>,
|
||||||
|
|
Loading…
Reference in a new issue