is edit mode is gone from the codebase
This commit is contained in:
@@ -544,7 +544,7 @@ pub async fn run_ui() -> Result<()> {
|
||||
|
||||
if let Page::Form(form_state) = &mut router.current {
|
||||
if !table_just_switched {
|
||||
if position_changed && !matches!(app_state.form_editor.as_ref().map(|e| e.mode()), Some(canvas::AppMode::Edit)) {
|
||||
if position_changed && !app_state.is_canvas_edit_mode() {
|
||||
position_logic_needs_redraw = true;
|
||||
|
||||
if let Some(form_state) = app_state.form_state_mut() {
|
||||
@@ -582,7 +582,7 @@ pub async fn run_ui() -> Result<()> {
|
||||
form_state.current_cursor_pos =
|
||||
event_handler.ideal_cursor_column.min(max_cursor_pos);
|
||||
}
|
||||
} else if !position_changed && !matches!(app_state.form_editor.as_ref().map(|e| e.mode()), Some(canvas::AppMode::Edit)) {
|
||||
} else if !position_changed && !app_state.is_canvas_edit_mode() {
|
||||
if let Some(form_state) = app_state.form_state_mut() {
|
||||
let current_input_str = form_state.get_current_input();
|
||||
let current_input_len = current_input_str.chars().count();
|
||||
@@ -597,7 +597,7 @@ pub async fn run_ui() -> Result<()> {
|
||||
}
|
||||
}
|
||||
} else if let Page::Register(state) = &mut router.current {
|
||||
if !matches!(app_state.form_editor.as_ref().map(|e| e.mode()), Some(canvas::AppMode::Edit)) {
|
||||
if !app_state.is_canvas_edit_mode() {
|
||||
let current_input = state.get_current_input();
|
||||
let max_cursor_pos =
|
||||
if !current_input.is_empty() { current_input.len() - 1 } else { 0 };
|
||||
@@ -605,7 +605,7 @@ pub async fn run_ui() -> Result<()> {
|
||||
event_handler.ideal_cursor_column.min(max_cursor_pos);
|
||||
}
|
||||
} else if let Page::Login(state) = &mut router.current {
|
||||
if !matches!(app_state.form_editor.as_ref().map(|e| e.mode()), Some(canvas::AppMode::Edit)) {
|
||||
if !app_state.is_canvas_edit_mode() {
|
||||
let current_input = state.get_current_input();
|
||||
let max_cursor_pos =
|
||||
if !current_input.is_empty() { current_input.len() - 1 } else { 0 };
|
||||
|
||||
Reference in New Issue
Block a user