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

View file

@ -669,6 +669,16 @@ Happy note taking! ✨
case ':intern':
_toggleExternalEditor(false);
break;
case ':fav':
setState(() { _showOnlyFavorites = !_showOnlyFavorites; });
_filterNotes();
break;
case ':sub':
_toggleIncludeSubdirectories(!_includeSubdirectories);
break;
case ':content':
_toggleIncludeFileContent(!_includeFileContent);
break;
case ':emptytrash':
_confirmEmptyTrash();
break;

View file

@ -74,13 +74,16 @@ Empty folders are automatically removed after the last file is deleted.
Type a colon command in the search bar and press Enter:
:help Open this guide.
:about Open app information.
:tags Toggle tag visibility.
:fav Toggle favorites filter.
:sub Toggle subdirectory search.
:content Toggle file content search.
:day Switch to light theme.
:night Switch to dark theme.
:extern Toggle external editor.
:intern Toggle internal editor.
:emptytrash Permanently delete trashed notes.
:about Open app information.
""";