mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 02:20:10 +00:00
Show notification when attempting to open local settings in a project w/ no folders
This commit is contained in:
parent
296a0bf510
commit
cfcfc3bf6b
1 changed files with 7 additions and 2 deletions
|
@ -44,8 +44,9 @@ use uuid::Uuid;
|
||||||
use welcome::BaseKeymap;
|
use welcome::BaseKeymap;
|
||||||
pub use workspace;
|
pub use workspace;
|
||||||
use workspace::{
|
use workspace::{
|
||||||
create_and_open_local_file, dock::PanelHandle, open_new, AppState, NewFile, NewWindow,
|
create_and_open_local_file, dock::PanelHandle,
|
||||||
Workspace, WorkspaceSettings,
|
notifications::simple_message_notification::MessageNotification, open_new, AppState, NewFile,
|
||||||
|
NewWindow, Workspace, WorkspaceSettings,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Deserialize, Clone, PartialEq)]
|
#[derive(Deserialize, Clone, PartialEq)]
|
||||||
|
@ -626,6 +627,10 @@ fn open_local_settings_file(
|
||||||
anyhow::Ok(())
|
anyhow::Ok(())
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
|
} else {
|
||||||
|
workspace.show_notification(0, cx, |cx| {
|
||||||
|
cx.add_view(|_| MessageNotification::new("This project has no folders open."))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue