mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
When loggin in, send user id instead of creating a new watch channel
This commit is contained in:
parent
bb570d3702
commit
d9d52b8aa5
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ use gpui::{AsyncAppContext, Entity, ModelContext, Task};
|
|||
use lazy_static::lazy_static;
|
||||
use parking_lot::RwLock;
|
||||
use postage::prelude::Stream;
|
||||
use postage::sink::Sink;
|
||||
use postage::watch;
|
||||
use std::any::TypeId;
|
||||
use std::collections::HashMap;
|
||||
|
|
@ -225,7 +226,7 @@ impl Client {
|
|||
.detach();
|
||||
let mut state = self.state.write();
|
||||
state.connection_id = Some(connection_id);
|
||||
state.user_id = watch::channel_with(Some(user_id));
|
||||
state.user_id.0.send(Some(user_id)).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue