mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #981, avoid some glitches related to GIF playing
This commit is contained in:
@@ -163,11 +163,15 @@ class PhotoFragment : ViewPagerFragment() {
|
|||||||
initExtendedDetails()
|
initExtendedDetails()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wasInit && (config.allowZoomingImages != storedAllowDeepZoomableImages || config.showHighestQuality != storedShowHighestQuality ||
|
if (wasInit) {
|
||||||
config.oneFingerZoom != storedAllowOneFingerZoom)) {
|
if (config.allowZoomingImages != storedAllowDeepZoomableImages || config.showHighestQuality != storedShowHighestQuality ||
|
||||||
isSubsamplingVisible = false
|
config.oneFingerZoom != storedAllowOneFingerZoom) {
|
||||||
view.subsampling_view.beGone()
|
isSubsamplingVisible = false
|
||||||
loadImage()
|
view.subsampling_view.beGone()
|
||||||
|
loadImage()
|
||||||
|
} else if (medium.isGIF()) {
|
||||||
|
loadGif()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val allowPhotoGestures = config.allowPhotoGestures
|
val allowPhotoGestures = config.allowPhotoGestures
|
||||||
@@ -518,7 +522,18 @@ class PhotoFragment : ViewPagerFragment() {
|
|||||||
|
|
||||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||||
super.onConfigurationChanged(newConfig)
|
super.onConfigurationChanged(newConfig)
|
||||||
loadImage()
|
|
||||||
|
// avoid GIFs being skewed, played in wrong aspect ratio
|
||||||
|
if (medium.isGIF()) {
|
||||||
|
view.onGlobalLayout {
|
||||||
|
Handler().postDelayed({
|
||||||
|
loadGif()
|
||||||
|
}, 50)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
loadImage()
|
||||||
|
}
|
||||||
|
|
||||||
initExtendedDetails()
|
initExtendedDetails()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user