From 7605e906321eaa498e7c7744afdd15354f99a63f Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 29 May 2020 20:41:23 +0200 Subject: [PATCH] show Portrait photos by default on Android 10+ --- .../simplemobiletools/gallery/pro/helpers/Constants.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt index 35933b7df..c7890b82f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt @@ -1,7 +1,7 @@ package com.simplemobiletools.gallery.pro.helpers import com.simplemobiletools.commons.helpers.MONTH_SECONDS -import com.simplemobiletools.commons.helpers.isPiePlus +import com.simplemobiletools.commons.helpers.isQPlus // shared preferences const val DIRECTORY_SORT_ORDER = "directory_sort_order" @@ -171,7 +171,13 @@ const val TYPE_RAWS = 8 const val TYPE_SVGS = 16 const val TYPE_PORTRAITS = 32 -fun getDefaultFileFilter() = TYPE_IMAGES or TYPE_VIDEOS or TYPE_GIFS or TYPE_RAWS or TYPE_SVGS +fun getDefaultFileFilter(): Int { + var mask = TYPE_IMAGES or TYPE_VIDEOS or TYPE_GIFS or TYPE_RAWS or TYPE_SVGS + if (isQPlus()) { + mask += TYPE_PORTRAITS + } + return mask +} const val LOCATION_INTERNAL = 1 const val LOCATION_SD = 2