Hide Live Photo folder entirely from UI
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.
This commit is contained in:
@@ -296,6 +296,7 @@ class AppState(private val configStore: ConfigStore) {
|
|||||||
val zoneId = java.time.ZoneId.systemDefault()
|
val zoneId = java.time.ZoneId.systemDefault()
|
||||||
return photos
|
return photos
|
||||||
.groupBy { it.sourceFolder }
|
.groupBy { it.sourceFolder }
|
||||||
|
.filterKeys { !ExifFilter.isHiddenFolder(it) } // hide Live Photo MOV folder
|
||||||
.map { (name, folderPhotos) ->
|
.map { (name, folderPhotos) ->
|
||||||
val dates = folderPhotos.map {
|
val dates = folderPhotos.map {
|
||||||
it.dateTaken.atZone(zoneId).toLocalDate()
|
it.dateTaken.atZone(zoneId).toLocalDate()
|
||||||
|
|||||||
@@ -134,7 +134,8 @@ fun BrowseScreen(state: AppState) {
|
|||||||
|
|
||||||
private fun buildFolderSections(pl: PhotoListState.Loaded): List<FolderSection> {
|
private fun buildFolderSections(pl: PhotoListState.Loaded): List<FolderSection> {
|
||||||
val zoneId = ZoneId.systemDefault()
|
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
|
val photos = pl.all
|
||||||
.filter { it.sourceFolder == folder.name }
|
.filter { it.sourceFolder == folder.name }
|
||||||
.sortedByDescending { it.dateTaken }
|
.sortedByDescending { it.dateTaken }
|
||||||
|
|||||||
@@ -114,6 +114,14 @@ object ExifFilter {
|
|||||||
screenshotFilePrefixes.none { lower.startsWith(it) }
|
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).
|
* Returns photos that are HEIC files (and not Live Photo motion clips).
|
||||||
* Used to determine whether to show the HEIC conversion warning.
|
* Used to determine whether to show the HEIC conversion warning.
|
||||||
|
|||||||
Reference in New Issue
Block a user