mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
Fix an issue where folders were not fully displayed on the favorites page.
This commit is contained in:
@@ -86,9 +86,34 @@ class _LeftBarState extends State<_LeftBar> implements FolderList {
|
|||||||
padding: widget.withAppbar
|
padding: widget.withAppbar
|
||||||
? EdgeInsets.zero
|
? EdgeInsets.zero
|
||||||
: EdgeInsets.only(top: context.padding.top),
|
: EdgeInsets.only(top: context.padding.top),
|
||||||
itemCount: folders.length + networkFolders.length + 2,
|
itemCount: folders.length + networkFolders.length + 3,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
|
return buildLocalTitle();
|
||||||
|
}
|
||||||
|
index--;
|
||||||
|
if (index == 0) {
|
||||||
|
return buildLocalFolder(_localAllFolderLabel);
|
||||||
|
}
|
||||||
|
index--;
|
||||||
|
if (index < folders.length) {
|
||||||
|
return buildLocalFolder(folders[index]);
|
||||||
|
}
|
||||||
|
index -= folders.length;
|
||||||
|
if (index == 0) {
|
||||||
|
return buildNetworkTitle();
|
||||||
|
}
|
||||||
|
index--;
|
||||||
|
return buildNetworkFolder(networkFolders[index]);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildLocalTitle() {
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -132,16 +157,8 @@ class _LeftBarState extends State<_LeftBar> implements FolderList {
|
|||||||
).paddingHorizontal(16),
|
).paddingHorizontal(16),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
index--;
|
|
||||||
if (index == 0) {
|
Widget buildNetworkTitle() {
|
||||||
return buildLocalFolder(_localAllFolderLabel);
|
|
||||||
}
|
|
||||||
index--;
|
|
||||||
if (index < folders.length) {
|
|
||||||
return buildLocalFolder(folders[index]);
|
|
||||||
}
|
|
||||||
index -= folders.length;
|
|
||||||
if (index == 0) {
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||||
margin: const EdgeInsets.only(top: 8),
|
margin: const EdgeInsets.only(top: 8),
|
||||||
@@ -175,15 +192,6 @@ class _LeftBarState extends State<_LeftBar> implements FolderList {
|
|||||||
).paddingHorizontal(16),
|
).paddingHorizontal(16),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
index--;
|
|
||||||
return buildNetworkFolder(networkFolders[index]);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget buildLocalFolder(String name) {
|
Widget buildLocalFolder(String name) {
|
||||||
bool isSelected = name == favPage.folder && !favPage.isNetwork;
|
bool isSelected = name == favPage.folder && !favPage.isNetwork;
|
||||||
|
Reference in New Issue
Block a user