From 46dcd234191dc4a7067a66ae7b8df0faafec6cbc Mon Sep 17 00:00:00 2001 From: randogoth Date: Fri, 19 Jun 2026 19:13:56 +0300 Subject: [PATCH] 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 --- lib/note_editor.dart | 2 ++ lib/note_list.dart | 10 ++++++++++ lib/texts.dart | 5 ++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/note_editor.dart b/lib/note_editor.dart index 23624d7..add1c60 100755 --- a/lib/note_editor.dart +++ b/lib/note_editor.dart @@ -56,6 +56,7 @@ class _NoteEditorScreenState extends State { 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 { setState(() { _fontSize = newSize; }); + SharedPreferences.getInstance().then((prefs) => prefs.setDouble('font_size', newSize)); } @override diff --git a/lib/note_list.dart b/lib/note_list.dart index 4880afa..a18e829 100755 --- a/lib/note_list.dart +++ b/lib/note_list.dart @@ -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; diff --git a/lib/texts.dart b/lib/texts.dart index e66c8f5..79e1e0a 100755 --- a/lib/texts.dart +++ b/lib/texts.dart @@ -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. """;