Allow modals to override their dismissal

Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
This commit is contained in:
Joseph T. Lyons
2023-12-08 15:29:44 -05:00
co-authored by Mikayla Maki
parent 1c850f495c
commit 113c7287df
13 changed files with 118 additions and 46 deletions
@@ -13,8 +13,8 @@ use std::sync::Arc;
use ui::{prelude::*, ListItem};
use util::paths::PathExt;
use workspace::{
notifications::simple_message_notification::MessageNotification, Workspace, WorkspaceLocation,
WORKSPACE_DB,
notifications::simple_message_notification::MessageNotification, ModalView, Workspace,
WorkspaceLocation, WORKSPACE_DB,
};
pub use projects::OpenRecent;
@@ -27,6 +27,8 @@ pub struct RecentProjects {
picker: View<Picker<RecentProjectsDelegate>>,
}
impl ModalView for RecentProjects {}
impl RecentProjects {
fn new(delegate: RecentProjectsDelegate, cx: &mut ViewContext<Self>) -> Self {
Self {