mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 08:18:00 +01:00
fix a typo at photo fragment visibility check
This commit is contained in:
parent
57a076d65c
commit
a93d4be112
1 changed files with 7 additions and 5 deletions
|
@ -113,9 +113,11 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
if (menuVisible) {
|
if (menuVisible) {
|
||||||
addZoomableView()
|
addZoomableView()
|
||||||
} else {
|
} else {
|
||||||
view.subsampling_view.recycle()
|
view.subsampling_view.apply {
|
||||||
view.subsampling_view.beGone()
|
recycle()
|
||||||
view.subsampling_view.background = ColorDrawable(Color.TRANSPARENT)
|
beGone()
|
||||||
|
background = ColorDrawable(Color.TRANSPARENT)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,7 +172,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResourceReady(resource: Bitmap?, model: String?, target: Target<Bitmap>?, isFromMemoryCache: Boolean, isFirstResource: Boolean): Boolean {
|
override fun onResourceReady(resource: Bitmap?, model: String?, target: Target<Bitmap>?, isFromMemoryCache: Boolean, isFirstResource: Boolean): Boolean {
|
||||||
if (isMenuVisible)
|
if (isFragmentVisible)
|
||||||
addZoomableView()
|
addZoomableView()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -188,7 +190,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addZoomableView() {
|
private fun addZoomableView() {
|
||||||
if ((medium.isImage()) && isMenuVisible && view.subsampling_view.visibility == View.GONE) {
|
if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.visibility == View.GONE) {
|
||||||
view.subsampling_view.apply {
|
view.subsampling_view.apply {
|
||||||
maxScale = 10f
|
maxScale = 10f
|
||||||
beVisible()
|
beVisible()
|
||||||
|
|
Loading…
Reference in a new issue