mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Add an 'All' folder to the local favorites page. Close #335
This commit is contained in:
@@ -102,13 +102,6 @@ class _LeftBarState extends State<_LeftBar> implements FolderList {
|
||||
const Spacer(),
|
||||
MenuButton(
|
||||
entries: [
|
||||
MenuEntry(
|
||||
icon: Icons.search,
|
||||
text: 'Search'.tl,
|
||||
onClick: () {
|
||||
context.to(() => const LocalSearchPage());
|
||||
},
|
||||
),
|
||||
MenuEntry(
|
||||
icon: Icons.add,
|
||||
text: 'Create Folder'.tl,
|
||||
@@ -140,6 +133,10 @@ class _LeftBarState extends State<_LeftBar> implements FolderList {
|
||||
);
|
||||
}
|
||||
index--;
|
||||
if (index == 0) {
|
||||
return buildLocalFolder(_localAllFolderLabel);
|
||||
}
|
||||
index--;
|
||||
if (index < folders.length) {
|
||||
return buildLocalFolder(folders[index]);
|
||||
}
|
||||
@@ -214,7 +211,9 @@ class _LeftBarState extends State<_LeftBar> implements FolderList {
|
||||
),
|
||||
),
|
||||
padding: const EdgeInsets.only(left: 16),
|
||||
child: Text(name),
|
||||
child: Text(name == _localAllFolderLabel
|
||||
? "All".tl
|
||||
: getFavoriteDataOrNull(name)?.title ?? name),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user