diff --git a/packages/neon/neon_news/lib/widgets/feeds_view.dart b/packages/neon/neon_news/lib/widgets/feeds_view.dart index d57ba8ad..cdb770d6 100644 --- a/packages/neon/neon_news/lib/widgets/feeds_view.dart +++ b/packages/neon/neon_news/lib/widgets/feeds_view.dart @@ -57,12 +57,11 @@ class NewsFeedsView extends StatelessWidget { value: NewsFeedAction.rename, child: Text(NewsLocalizations.of(context).actionRename), ), - if (folders.isNotEmpty) ...[ + if (folders.isNotEmpty) PopupMenuItem( value: NewsFeedAction.move, child: Text(NewsLocalizations.of(context).actionMove), ), - ], ], onSelected: (final action) async { switch (action) { diff --git a/packages/neon/neon_notes/lib/dialogs/create_note.dart b/packages/neon/neon_notes/lib/dialogs/create_note.dart index 6f1c3add..47a4db4a 100644 --- a/packages/neon/neon_notes/lib/dialogs/create_note.dart +++ b/packages/neon/neon_notes/lib/dialogs/create_note.dart @@ -60,9 +60,11 @@ class _NotesCreateNoteDialogState extends State { onRetry: widget.bloc.refresh, ), ), - if (widget.category == null && notes.isLoading) - const Center( - child: NeonLinearProgressIndicator(), + if (widget.category == null) + Center( + child: NeonLinearProgressIndicator( + visible: notes.isLoading, + ), ), if (widget.category == null && notes.hasData) NotesCategorySelect( diff --git a/packages/neon/neon_notes/lib/dialogs/select_category.dart b/packages/neon/neon_notes/lib/dialogs/select_category.dart index 04b4b275..436d25e4 100644 --- a/packages/neon/neon_notes/lib/dialogs/select_category.dart +++ b/packages/neon/neon_notes/lib/dialogs/select_category.dart @@ -36,18 +36,19 @@ class _NotesSelectCategoryDialogState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ - Center( - child: NeonError( - notes.error, - onRetry: widget.bloc.refresh, + if (notes.hasError) + Center( + child: NeonError( + notes.error, + onRetry: widget.bloc.refresh, + ), ), - ), Center( child: NeonLinearProgressIndicator( visible: notes.isLoading, ), ), - if (notes.hasData) ...[ + if (notes.hasData) NotesCategorySelect( categories: notes.requireData.map((final note) => note.category).toSet().toList(), initialValue: widget.initialCategory, @@ -56,7 +57,6 @@ class _NotesSelectCategoryDialogState extends State { }, onSubmitted: submit, ), - ], ElevatedButton( onPressed: submit, child: Text(NotesLocalizations.of(context).noteSetCategory), diff --git a/packages/neon/neon_notes/lib/widgets/notes_view.dart b/packages/neon/neon_notes/lib/widgets/notes_view.dart index 7225ed17..d86c6805 100644 --- a/packages/neon/neon_notes/lib/widgets/notes_view.dart +++ b/packages/neon/neon_notes/lib/widgets/notes_view.dart @@ -45,20 +45,20 @@ class NotesView extends StatelessWidget { RelativeTime( date: DateTime.fromMillisecondsSinceEpoch(note.modified * 1000), ), - if (note.category.isNotEmpty) ...[ - const SizedBox( - width: 8, - ), - Icon( - MdiIcons.tag, - size: smallIconSize, - color: NotesCategoryColor.compute(note.category), + if (note.category.isNotEmpty) + Padding( + padding: const EdgeInsets.only(top: 8), + child: Icon( + MdiIcons.tag, + size: smallIconSize, + color: NotesCategoryColor.compute(note.category), + ), ), - const SizedBox( - width: 2, + if (note.category.isNotEmpty) + Padding( + padding: const EdgeInsets.only(top: 2), + child: Text(note.category), ), - Text(note.category), - ], ], ), trailing: IconButton(