diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SimpleActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SimpleActivity.kt index 2be7d90fe..684fcd4dc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SimpleActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/SimpleActivity.kt @@ -6,11 +6,13 @@ import android.net.Uri import android.provider.MediaStore import android.view.WindowManager import com.simplemobiletools.commons.activities.BaseSimpleActivity +import com.simplemobiletools.commons.extensions.getParentPath import com.simplemobiletools.commons.extensions.getRealPathFromURI import com.simplemobiletools.commons.helpers.isPiePlus import com.simplemobiletools.gallery.pro.R import com.simplemobiletools.gallery.pro.extensions.addPathToDB import com.simplemobiletools.gallery.pro.extensions.config +import com.simplemobiletools.gallery.pro.extensions.updateDirectoryPath open class SimpleActivity : BaseSimpleActivity() { val observer = object : ContentObserver(null) { @@ -18,6 +20,7 @@ open class SimpleActivity : BaseSimpleActivity() { super.onChange(selfChange, uri) val path = getRealPathFromURI(uri) if (path != null) { + updateDirectoryPath(path.getParentPath()) addPathToDB(path) } }