Cache credentials in memory separately from connection status
This prevents us from re-prompting for keychain access when we retry connections after the connection is lost. Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
co-authored by
Max Brunsfeld
parent
aa7c1bfa2d
commit
44a457e8b6
+2
-2
@@ -51,8 +51,8 @@ impl UserStore {
|
||||
let mut status = rpc.status();
|
||||
while let Some(status) = status.recv().await {
|
||||
match status {
|
||||
Status::Connected { user_id, .. } => {
|
||||
if let Some(this) = this.upgrade() {
|
||||
Status::Connected { .. } => {
|
||||
if let Some((this, user_id)) = this.upgrade().zip(rpc.user_id()) {
|
||||
current_user_tx
|
||||
.send(this.fetch_user(user_id).log_err().await)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user