From e778f73ee750b294ef81d4a2fedd5262e7d665ce Mon Sep 17 00:00:00 2001 From: jld3103 Date: Thu, 10 Aug 2023 22:55:38 +0200 Subject: [PATCH] fix(neon_files): Fix empty categories Signed-off-by: jld3103 --- packages/neon/neon_notes/lib/widgets/category_select.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/neon/neon_notes/lib/widgets/category_select.dart b/packages/neon/neon_notes/lib/widgets/category_select.dart index 040cf27d..ca5a8f54 100644 --- a/packages/neon/neon_notes/lib/widgets/category_select.dart +++ b/packages/neon/neon_notes/lib/widgets/category_select.dart @@ -14,8 +14,7 @@ class NotesCategorySelect extends StatelessWidget { categories.sort(); - // After sorting the empty category '' should be at the first place - if (categories.isNotEmpty && !categories.first.isNotEmpty) { + if (categories.isEmpty) { categories.insert(0, ''); } }