Auto-connect to server on startup if credentials are on the keychain

This commit is contained in:
Antonio Scandurra 2022-01-10 15:06:38 +01:00
parent 8d7bb8b1a3
commit e8bbd370e4
2 changed files with 14 additions and 0 deletions

View file

@ -356,6 +356,10 @@ impl Client {
}
}
pub fn has_keychain_credentials(&self, cx: &AsyncAppContext) -> bool {
read_credentials_from_keychain(cx).is_some()
}
#[async_recursion(?Send)]
pub async fn authenticate_and_connect(
self: &Arc<Self>,