mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
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
|
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() {
|
private fun initViewPager() {
|
||||||
val uri = intent.data
|
val uri = intent.data
|
||||||
if (uri != null) {
|
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() {
|
private fun checkDeleteConfirmation() {
|
||||||
if (getCurrentMedium() == null) {
|
if (getCurrentMedium() == null) {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue