From 347f182c30bcf041bf9b013752c2c705ba29c35e Mon Sep 17 00:00:00 2001 From: Kyle Bolen Date: Thu, 30 Jul 2026 04:55:18 +0000 Subject: [PATCH] Hide Live Photo folder entirely from UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ExifFilter.isHiddenFolder(): returns true for 'Live Photo' folder. buildFolderList: filters hidden folders before building FolderInfo list. Live Photo MOVs are now completely invisible — the LIVE badge on the HEIC is the only signal needed. No placeholder thumbnails in the panel. --- src/main/kotlin/com/bolenpad/photophetch/ui/AppState.kt | 1 + .../kotlin/com/bolenpad/photophetch/ui/BrowseScreen.kt | 3 ++- .../kotlin/com/bolenpad/photophetch/util/ExifFilter.kt | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/bolenpad/photophetch/ui/AppState.kt b/src/main/kotlin/com/bolenpad/photophetch/ui/AppState.kt index 52064b7..0bdec60 100644 --- a/src/main/kotlin/com/bolenpad/photophetch/ui/AppState.kt +++ b/src/main/kotlin/com/bolenpad/photophetch/ui/AppState.kt @@ -296,6 +296,7 @@ class AppState(private val configStore: ConfigStore) { val zoneId = java.time.ZoneId.systemDefault() return photos .groupBy { it.sourceFolder } + .filterKeys { !ExifFilter.isHiddenFolder(it) } // hide Live Photo MOV folder .map { (name, folderPhotos) -> val dates = folderPhotos.map { it.dateTaken.atZone(zoneId).toLocalDate() diff --git a/src/main/kotlin/com/bolenpad/photophetch/ui/BrowseScreen.kt b/src/main/kotlin/com/bolenpad/photophetch/ui/BrowseScreen.kt index abb91d8..9f49d87 100644 --- a/src/main/kotlin/com/bolenpad/photophetch/ui/BrowseScreen.kt +++ b/src/main/kotlin/com/bolenpad/photophetch/ui/BrowseScreen.kt @@ -134,7 +134,8 @@ fun BrowseScreen(state: AppState) { private fun buildFolderSections(pl: PhotoListState.Loaded): List { val zoneId = ZoneId.systemDefault() - return pl.folders.map { folder -> + return pl.folders // already filtered by buildFolderList (no hidden folders) + .map { folder -> val photos = pl.all .filter { it.sourceFolder == folder.name } .sortedByDescending { it.dateTaken } diff --git a/src/main/kotlin/com/bolenpad/photophetch/util/ExifFilter.kt b/src/main/kotlin/com/bolenpad/photophetch/util/ExifFilter.kt index 15e0863..431a2dd 100644 --- a/src/main/kotlin/com/bolenpad/photophetch/util/ExifFilter.kt +++ b/src/main/kotlin/com/bolenpad/photophetch/util/ExifFilter.kt @@ -114,6 +114,14 @@ object ExifFilter { screenshotFilePrefixes.none { lower.startsWith(it) } } + /** + * Folders that should be completely hidden from the UI (not even in Other). + * Live Photo companions are proven by the LIVE badge on the HEIC — showing + * the MOVs separately adds noise with unverifiable placeholder thumbnails. + */ + fun isHiddenFolder(folderName: String): Boolean = + folderName == "Live Photo" + /** * Returns photos that are HEIC files (and not Live Photo motion clips). * Used to determine whether to show the HEIC conversion warning.