persist font size, add :fav/:sub/:content commands

- note_editor: persist font size to SharedPreferences on change and
  restore it on load
- note_list: add :fav (toggle favorites filter), :sub (toggle
  subdirectory search), :content (toggle file content search) commands
- texts: document new commands in help content

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
randogoth 2026-06-19 19:13:56 +03:00
parent 8645c656f2
commit 46dcd23419
3 changed files with 16 additions and 1 deletions

View file

@ -56,6 +56,7 @@ class _NoteEditorScreenState extends State<NoteEditorScreen> {
final prefs = await SharedPreferences.getInstance();
setState(() {
_autoSaveEnabled = prefs.getBool('auto_save_enabled') ?? false;
_fontSize = prefs.getDouble('font_size') ?? 16.0;
});
}
@ -164,6 +165,7 @@ class _NoteEditorScreenState extends State<NoteEditorScreen> {
setState(() {
_fontSize = newSize;
});
SharedPreferences.getInstance().then((prefs) => prefs.setDouble('font_size', newSize));
}
@override