Merge branch 'main' into go-to-line2
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
use std::{any::TypeId, sync::Arc};
|
||||
|
||||
use gpui::{
|
||||
div, px, AnyView, AppContext, Component, DispatchPhase, Div, ParentElement, Render,
|
||||
StatelessInteractive, Styled, View, ViewContext,
|
||||
};
|
||||
use ui::v_stack;
|
||||
|
||||
use crate::Workspace;
|
||||
use gpui::{
|
||||
div, px, AnyView, AppContext, Component, Div, ParentElement, Render, StatelessInteractive,
|
||||
Styled, View, ViewContext,
|
||||
};
|
||||
use std::{any::TypeId, sync::Arc};
|
||||
use ui::v_stack;
|
||||
|
||||
pub struct ModalRegistry {
|
||||
registered_modals: Vec<(TypeId, Box<dyn Fn(Div<Workspace>) -> Div<Workspace>>)>,
|
||||
@@ -43,14 +41,7 @@ impl ModalRegistry {
|
||||
let build_view = build_view.clone();
|
||||
|
||||
div.on_action(
|
||||
move |workspace: &mut Workspace,
|
||||
event: &A,
|
||||
phase: DispatchPhase,
|
||||
cx: &mut ViewContext<Workspace>| {
|
||||
if phase == DispatchPhase::Capture {
|
||||
return;
|
||||
}
|
||||
|
||||
move |workspace: &mut Workspace, event: &A, cx: &mut ViewContext<Workspace>| {
|
||||
let Some(new_modal) = (build_view)(workspace, cx) else {
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -2694,7 +2694,7 @@ impl Workspace {
|
||||
.any(|item| item.has_conflict(cx) || item.is_dirty(cx));
|
||||
if is_edited != self.window_edited {
|
||||
self.window_edited = is_edited;
|
||||
todo!()
|
||||
// todo!()
|
||||
// cx.set_window_edited(self.window_edited)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user