From 6c05ce1864829ce80f7b6f7b687bfa306279bc28 Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Sat, 26 Oct 2024 10:56:59 +0200 Subject: [PATCH] Make sure tap outside of open group closes group --- app/src/main/kotlin/org/fossify/home/views/HomeScreenGrid.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/kotlin/org/fossify/home/views/HomeScreenGrid.kt b/app/src/main/kotlin/org/fossify/home/views/HomeScreenGrid.kt index 3762f69f..978f2826 100644 --- a/app/src/main/kotlin/org/fossify/home/views/HomeScreenGrid.kt +++ b/app/src/main/kotlin/org/fossify/home/views/HomeScreenGrid.kt @@ -1317,6 +1317,11 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel } } + // if a folder is open, we only want to allow clicks on items in the folder + if (currentlyOpenFolder != null) { + return null + } + for (gridItem in gridItems.filterVisibleOnCurrentPageOnly()) { if (gridItem.outOfBounds()) { continue