On external file drop, add visible project entries for directories only

This commit is contained in:
Kirill Bulatov 2024-01-07 02:59:56 +02:00
parent c499e1ed38
commit 4f88a50aad
4 changed files with 77 additions and 23 deletions

View file

@ -11,7 +11,7 @@ use std::{
path::{Path, PathBuf},
sync::Arc,
};
use workspace::{AppState, Workspace};
use workspace::{AppState, OpenVisible, Workspace};
actions!(journal, [NewJournalEntry]);
@ -100,7 +100,7 @@ pub fn new_journal_entry(app_state: Arc<AppState>, cx: &mut WindowContext) {
let opened = workspace
.update(&mut cx, |workspace, cx| {
workspace.open_paths(vec![entry_path], true, None, cx)
workspace.open_paths(vec![entry_path], OpenVisible::All, None, cx)
})?
.await;