This commit is contained in:
Antonio Scandurra 2023-10-22 16:53:59 +02:00
parent 5d10dc7e58
commit 50bbdd5cab
5 changed files with 107 additions and 10 deletions

View file

@ -193,16 +193,14 @@ impl UserStore {
}
Status::SignedOut => {
current_user_tx.send(None).await.ok();
if let Some(this) = this.upgrade(&cx) {
this.update(&mut cx, |this, cx| {
cx.notify();
this.clear_contacts()
})
.await;
}
this.update(&mut cx, |this, cx| {
cx.notify();
this.clear_contacts()
})
.await;
}
Status::ConnectionLost => {
if let Some(this) = this.upgrade(&cx) {
if let Some(this) = this.upgrade() {
this.update(&mut cx, |this, cx| {
cx.notify();
this.clear_contacts()