diff --git a/app/build.gradle b/app/build.gradle index 55e188564..65336cac1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -62,7 +62,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.15.31' + implementation 'com.simplemobiletools:commons:5.15.33' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index c248e6b05..f053fc89a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -835,7 +835,9 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { } else { val isVideo = path.isVideoFast() if (isVideo) { - openPath(path, false) + val extras = HashMap() + extras[SHOW_FAVORITES] = mPath == FAVORITES + openPath(path, false, extras) } else { Intent(this, ViewPagerActivity::class.java).apply { putExtra(PATH, path) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt index a1ebf1968..f893e8eba 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt @@ -229,6 +229,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList private fun sendViewPagerIntent(path: String) { Intent(this, ViewPagerActivity::class.java).apply { + putExtra(SHOW_FAVORITES, intent.getBooleanExtra(SHOW_FAVORITES, false)) putExtra(IS_VIEW_INTENT, true) putExtra(IS_FROM_GALLERY, mIsFromGallery) putExtra(PATH, path) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index 446821787..274d4f147 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -60,8 +60,8 @@ fun Activity.setAs(path: String) { setAsIntent(path, BuildConfig.APPLICATION_ID) } -fun Activity.openPath(path: String, forceChooser: Boolean) { - openPathIntent(path, forceChooser, BuildConfig.APPLICATION_ID) +fun Activity.openPath(path: String, forceChooser: Boolean, extras: HashMap = HashMap()) { + openPathIntent(path, forceChooser, BuildConfig.APPLICATION_ID, extras = extras) } fun Activity.openEditor(path: String, forceChooser: Boolean = false) {