fix(input): remember "draw with the finger", on by default on Android (Issue #50)

The setting was never saved and always started off, so one finger only
moved the page after every start. On a phone without a pen nothing could
be written until it was switched on again, and an update restarts the
app. It is now saved with the other UI settings and starts on on
Android, where phones usually have no pen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
haraldandClaude Opus 5.5 committed 2026-11-05 12:20:52 +01:00
1 parent 298932cb32
commit 0d9e9aa2ea
3 files changed
+28 -7

No files matched your search

+9
View File
@@ -1471,6 +1471,7 @@ pub fn run_with(
ui_state.stylus_buttons = ui_settings.stylus_buttons.clone();
ui_state.set_eraser_radius_mm(ui_settings.eraser_radius_mm);
ui_state.math.set_enabled(ui_settings.math_assist);
ui_state.touch_draw_enabled = ui_settings.touch_draw;
ui_state.select_pen(ui_settings.active_pen);
ui_state.highlighter_colors = ui_settings.highlighter_colors;
ui_state.select_highlighter_color(ui_settings.active_highlighter);
@@ -5356,6 +5357,14 @@ pub fn run_with(
&mut ui_state,
);
}
UiAction::SetTouchDraw(on) => {
ui_settings.touch_draw = on;
save_ui_settings(
&ui_settings,
ui_settings_path.as_deref(),
&mut ui_state,
);
}
UiAction::SetSidebarSide(side) => {
ui_settings.sidebar_side = side;
save_ui_settings(