reordering some PhotoFragment functions
This commit is contained in:
parent
bb038aa47b
commit
57e7fb03d1
|
@ -204,6 +204,33 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
storeStateVariables()
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
if (activity?.isDestroyed == false) {
|
||||
mView.subsampling_view.recycle()
|
||||
}
|
||||
mIoadZoomableViewHandler.removeCallbacksAndMessages(null)
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
|
||||
// avoid GIFs being skewed, played in wrong aspect ratio
|
||||
if (mMedium.isGIF()) {
|
||||
mView.onGlobalLayout {
|
||||
Handler().postDelayed({
|
||||
loadGif()
|
||||
}, 50)
|
||||
}
|
||||
} else {
|
||||
hideZoomableView()
|
||||
loadImage()
|
||||
}
|
||||
|
||||
initExtendedDetails()
|
||||
updateInstantSwitchWidths()
|
||||
}
|
||||
|
||||
override fun setMenuVisibility(menuVisible: Boolean) {
|
||||
super.setMenuVisibility(menuVisible)
|
||||
mIsFragmentVisible = menuVisible
|
||||
|
@ -537,33 +564,6 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
if (activity?.isDestroyed == false) {
|
||||
mView.subsampling_view.recycle()
|
||||
}
|
||||
mIoadZoomableViewHandler.removeCallbacksAndMessages(null)
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
|
||||
// avoid GIFs being skewed, played in wrong aspect ratio
|
||||
if (mMedium.isGIF()) {
|
||||
mView.onGlobalLayout {
|
||||
Handler().postDelayed({
|
||||
loadGif()
|
||||
}, 50)
|
||||
}
|
||||
} else {
|
||||
hideZoomableView()
|
||||
loadImage()
|
||||
}
|
||||
|
||||
initExtendedDetails()
|
||||
updateInstantSwitchWidths()
|
||||
}
|
||||
|
||||
private fun hideZoomableView() {
|
||||
if (context?.config?.allowZoomingImages == true) {
|
||||
mIsSubsamplingVisible = false
|
||||
|
|
Loading…
Reference in New Issue