Show host in titlebar

Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Conrad Irwin 2023-09-29 16:02:36 -06:00
parent 219715449d
commit 1cfc2f0c07
7 changed files with 110 additions and 2 deletions

View file

@ -453,6 +453,10 @@ impl Client {
self.state.read().status.1.clone()
}
pub fn is_connected(&self) -> bool {
matches!(&*self.status().borrow(), Status::Connected { .. })
}
fn set_status(self: &Arc<Self>, status: Status, cx: &AsyncAppContext) {
log::info!("set status on client {}: {:?}", self.id, status);
let mut state = self.state.write();

View file

@ -595,6 +595,10 @@ impl UserStore {
self.load_users(proto::FuzzySearchUsers { query }, cx)
}
pub fn get_cached_user(&self, user_id: u64) -> Option<Arc<User>> {
self.users.get(&user_id).cloned()
}
pub fn get_user(
&mut self,
user_id: u64,