This commit is contained in:
Kirill Bulatov 2023-11-01 15:37:51 +02:00
parent 73c97d0c10
commit a9d7c86307
3 changed files with 6 additions and 6 deletions

View file

@ -401,7 +401,7 @@ impl<T: Item> ItemHandle for View<T> {
let pending_update = Arc::new(Mutex::new(None)); let pending_update = Arc::new(Mutex::new(None));
let pending_update_scheduled = Arc::new(AtomicBool::new(false)); let pending_update_scheduled = Arc::new(AtomicBool::new(false));
let mut _event_subscription = let mut event_subscription =
Some(cx.subscribe(self, move |workspace, item, event, cx| { Some(cx.subscribe(self, move |workspace, item, event, cx| {
let pane = if let Some(pane) = workspace let pane = if let Some(pane) = workspace
.panes_by_item .panes_by_item

View file

@ -3370,9 +3370,9 @@ impl Workspace {
workspace: WeakView<Workspace>, workspace: WeakView<Workspace>,
serialized_workspace: SerializedWorkspace, serialized_workspace: SerializedWorkspace,
paths_to_open: Vec<Option<ProjectPath>>, paths_to_open: Vec<Option<ProjectPath>>,
cx: &mut AppContext, cx: &mut WindowContext,
) -> Task<Result<Vec<Option<Box<dyn ItemHandle>>>>> { ) -> Task<Result<Vec<Option<Box<dyn ItemHandle>>>>> {
cx.spawn(|mut cx| async move { cx.spawn(|_, mut cx| async move {
let (project, old_center_pane) = workspace.update(&mut cx, |workspace, _| { let (project, old_center_pane) = workspace.update(&mut cx, |workspace, _| {
( (
workspace.project().clone(), workspace.project().clone(),
@ -3564,7 +3564,7 @@ async fn open_items(
workspace: &WeakView<Workspace>, workspace: &WeakView<Workspace>,
mut project_paths_to_open: Vec<(PathBuf, Option<ProjectPath>)>, mut project_paths_to_open: Vec<(PathBuf, Option<ProjectPath>)>,
app_state: Arc<AppState>, app_state: Arc<AppState>,
mut cx: AsyncAppContext, mut cx: MainThread<AsyncAppContext>,
) -> Result<Vec<Option<Result<Box<dyn ItemHandle>>>>> { ) -> Result<Vec<Option<Result<Box<dyn ItemHandle>>>>> {
let mut opened_items = Vec::with_capacity(project_paths_to_open.len()); let mut opened_items = Vec::with_capacity(project_paths_to_open.len());

View file

@ -313,9 +313,9 @@ async fn installation_id() -> Result<String> {
} }
} }
async fn restore_or_create_workspace(_app_state: &Arc<AppState>, mut _cx: AsyncAppContext) { async fn restore_or_create_workspace(app_state: &Arc<AppState>, mut cx: AsyncAppContext) {
if let Some(location) = workspace2::last_opened_workspace_paths().await { if let Some(location) = workspace2::last_opened_workspace_paths().await {
cx.update(|cx| workspace2::open_paths(location.paths().as_ref(), app_state, None, cx)) cx.update(|cx| workspace2::open_paths(location.paths().as_ref(), app_state, None, cx))?
.await .await
.log_err(); .log_err();
} else if matches!(KEY_VALUE_STORE.read_kvp(FIRST_OPEN), Ok(None)) { } else if matches!(KEY_VALUE_STORE.read_kvp(FIRST_OPEN), Ok(None)) {