single click channel (#7596)
- Open channel notes and chat on channel click - WIP - Fix compile error - Don't join live kit until requested - Track in_call state separately from in_room Release Notes: - Improved channels: you can now be in a channel without joining the audio call automatically **or** - N/A --------- Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
2b39a9512a
commit
efe23ebfcd
26 changed files with 659 additions and 489 deletions
|
@ -13,7 +13,7 @@ use client::{
|
|||
use collections::{HashMap, HashSet};
|
||||
use fs::FakeFs;
|
||||
use futures::{channel::oneshot, StreamExt as _};
|
||||
use gpui::{BackgroundExecutor, Context, Model, TestAppContext, View, VisualTestContext};
|
||||
use gpui::{BackgroundExecutor, Context, Model, Task, TestAppContext, View, VisualTestContext};
|
||||
use language::LanguageRegistry;
|
||||
use node_runtime::FakeNodeRuntime;
|
||||
|
||||
|
@ -36,7 +36,7 @@ use std::{
|
|||
Arc,
|
||||
},
|
||||
};
|
||||
use util::http::FakeHttpClient;
|
||||
use util::{http::FakeHttpClient, SemanticVersion};
|
||||
use workspace::{Workspace, WorkspaceStore};
|
||||
|
||||
pub struct TestServer {
|
||||
|
@ -230,6 +230,7 @@ impl TestServer {
|
|||
server_conn,
|
||||
client_name,
|
||||
user,
|
||||
SemanticVersion::default(),
|
||||
None,
|
||||
Some(connection_id_tx),
|
||||
Executor::Deterministic(cx.background_executor().clone()),
|
||||
|
@ -685,7 +686,7 @@ impl TestClient {
|
|||
channel_id: u64,
|
||||
cx: &'a mut TestAppContext,
|
||||
) -> (View<Workspace>, &'a mut VisualTestContext) {
|
||||
cx.update(|cx| workspace::join_channel(channel_id, self.app_state.clone(), None, cx))
|
||||
cx.update(|cx| workspace::open_channel(channel_id, self.app_state.clone(), None, cx))
|
||||
.await
|
||||
.unwrap();
|
||||
cx.run_until_parked();
|
||||
|
@ -760,6 +761,11 @@ impl TestClient {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn join_channel_call(cx: &mut TestAppContext) -> Task<anyhow::Result<()>> {
|
||||
let room = cx.read(|cx| ActiveCall::global(cx).read(cx).room().cloned());
|
||||
room.unwrap().update(cx, |room, cx| room.join_call(cx))
|
||||
}
|
||||
|
||||
impl Drop for TestClient {
|
||||
fn drop(&mut self) {
|
||||
self.app_state.client.teardown();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue