Fix text labels incorrectly clickable in the new collection browser

This commit is contained in:
Ming Ming 2023-06-19 00:10:03 +08:00
parent e8b3c6e0a4
commit 19df299c6c

View file

@ -474,10 +474,13 @@ class _ContentListBody extends StatelessWidget {
bloc.add(_SetSelectedItems(items: selected.cast()));
},
onItemTap: (context, index, _) {
if (state.transformedItems[index] is! _FileItem) {
return;
}
final actualIndex = index -
state.transformedItems
.sublist(0, index)
.where((e) => e is! _ActualItem)
.where((e) => e is! _FileItem)
.length;
Navigator.of(context).pushNamed(
Viewer.routeName,