Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
client: Clear plan and usage information when signing out (#42678)
Marshall Bowerse80b490ac00b
diff --git a/crates/client/src/user.rs b/crates/client/src/user.rsindex 525a3e960ce..37f0f3ec278 100644--- a/crates/client/src/user.rs+++ b/crates/client/src/user.rs@@ -267,6 +267,7 @@ impl UserStore {Status::SignedOut => {current_user_tx.send(None).await.ok();this.update(cx, |this, cx| {+ this.clear_plan_and_usage();cx.emit(Event::PrivateUserInfoUpdated);cx.notify();this.clear_contacts()@@ -779,6 +780,12 @@ impl UserStore {cx.notify();}+ pub fn clear_plan_and_usage(&mut self) {+ self.plan_info = None;+ self.model_request_usage = None;+ self.edit_prediction_usage = None;+ }+fn update_authenticated_user(&mut self,response: GetAuthenticatedUserResponse,