Get server integration tests passing again

* Set up UserStore to have the current user, so that
  channel messages can be sent. This is needed now that
  pending messages are represented more similarly to
  regular messages.
* Drop buffer inside of an `AppContext.update` block, so that
  the Buffer's release hook is called in time.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-09-15 16:17:07 -07:00
co-authored by Nathan Sobo
parent 95ef70e4f4
commit 31b5602dc1
5 changed files with 140 additions and 117 deletions
+1 -3
View File
@@ -389,7 +389,7 @@ impl Workspace {
);
right_sidebar.add_item("icons/user-16.svg", cx.add_view(|_| ProjectBrowser).into());
let mut current_user = app_state.user_store.current_user().clone();
let mut current_user = app_state.user_store.watch_current_user().clone();
let mut connection_status = app_state.rpc.status().clone();
let _observe_current_user = cx.spawn_weak(|this, mut cx| async move {
current_user.recv().await;
@@ -990,8 +990,6 @@ impl Workspace {
let avatar = if let Some(avatar) = self
.user_store
.current_user()
.borrow()
.as_ref()
.and_then(|user| user.avatar.clone())
{
Image::new(avatar)