Use a WeakViewHandle in Client for view message handlers

This commit is contained in:
Antonio Scandurra 2023-04-26 12:08:15 +02:00
parent 57beec6071
commit 689e878bd8
3 changed files with 32 additions and 19 deletions

View file

@ -2219,7 +2219,7 @@ impl Workspace {
// RPC handlers
async fn handle_follow(
this: ViewHandle<Self>,
this: WeakViewHandle<Self>,
envelope: TypedEnvelope<proto::Follow>,
_: Arc<Client>,
mut cx: AsyncAppContext,
@ -2267,7 +2267,7 @@ impl Workspace {
}
async fn handle_unfollow(
this: ViewHandle<Self>,
this: WeakViewHandle<Self>,
envelope: TypedEnvelope<proto::Unfollow>,
_: Arc<Client>,
mut cx: AsyncAppContext,
@ -2282,7 +2282,7 @@ impl Workspace {
}
async fn handle_update_followers(
this: ViewHandle<Self>,
this: WeakViewHandle<Self>,
envelope: TypedEnvelope<proto::UpdateFollowers>,
_: Arc<Client>,
cx: AsyncAppContext,