From e6327409722d29694d80495ab2eefc3c46ac44e0 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 12 Dec 2019 11:09:02 +0100 Subject: [PATCH] just moving a function, no real change --- .../pro/activities/ViewPagerActivity.kt | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index 35db0bc82..086cc83dc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -234,6 +234,23 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View return true } + override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { + if (requestCode == REQUEST_EDIT_IMAGE && resultCode == Activity.RESULT_OK && resultData != null) { + mPos = -1 + mPrevHashcode = 0 + refreshViewPager() + } else if (requestCode == REQUEST_SET_AS && resultCode == Activity.RESULT_OK) { + toast(R.string.wallpaper_set_successfully) + } else if (requestCode == REQUEST_VIEW_VIDEO && resultCode == Activity.RESULT_OK && resultData != null) { + if (resultData.getBooleanExtra(GO_TO_NEXT_ITEM, false)) { + goToNextItem() + } else if (resultData.getBooleanExtra(GO_TO_PREV_ITEM, false)) { + goToPrevItem() + } + } + super.onActivityResult(requestCode, resultCode, resultData) + } + private fun initViewPager() { val uri = intent.data if (uri != null) { @@ -904,23 +921,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } - override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { - if (requestCode == REQUEST_EDIT_IMAGE && resultCode == Activity.RESULT_OK && resultData != null) { - mPos = -1 - mPrevHashcode = 0 - refreshViewPager() - } else if (requestCode == REQUEST_SET_AS && resultCode == Activity.RESULT_OK) { - toast(R.string.wallpaper_set_successfully) - } else if (requestCode == REQUEST_VIEW_VIDEO && resultCode == Activity.RESULT_OK && resultData != null) { - if (resultData.getBooleanExtra(GO_TO_NEXT_ITEM, false)) { - goToNextItem() - } else if (resultData.getBooleanExtra(GO_TO_PREV_ITEM, false)) { - goToPrevItem() - } - } - super.onActivityResult(requestCode, resultCode, resultData) - } - private fun checkDeleteConfirmation() { if (getCurrentMedium() == null) { return