Move sort option above archive

This commit is contained in:
Neeraj Gupta 2023-05-26 10:16:31 +05:30
parent acc6ecad77
commit b89d31ad03

View file

@ -283,6 +283,22 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
// Do not show archive option for favorite collection. If collection is
// already archived, allow user to unarchive that collection.
if (isArchived || widget.collection!.type != CollectionType.favorites) {
items.add(
PopupMenuItem(
value: 6,
child: Row(
children: [
const Icon(Icons.sort_outlined),
const Padding(
padding: EdgeInsets.all(8),
),
Text(
S.of(context).sortAlbumsBy,
),
],
),
),
);
items.add(
PopupMenuItem(
value: 2,
@ -303,22 +319,6 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
);
}
if (widget.collection!.type != CollectionType.favorites) {
items.add(
PopupMenuItem(
value: 6,
child: Row(
children: [
const Icon(Icons.sort_outlined),
const Padding(
padding: EdgeInsets.all(8),
),
Text(
S.of(context).sortAlbumsBy,
),
],
),
),
);
items.add(
PopupMenuItem(
value: 3,