just moving a function, no real change

This commit is contained in:
tibbi 2019-12-12 11:09:02 +01:00
parent 7fda22e5d5
commit e632740972

View file

@ -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