just moving a function, no real change
This commit is contained in:
parent
7fda22e5d5
commit
e632740972
1 changed files with 17 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue