It was not checked whether captionSheet is present.
This commit is contained in:
parent
a4708a5ddb
commit
481140b73a
|
@ -172,7 +172,7 @@ class ViewImageFragment : ViewMediaFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onToolbarVisibilityChange(visible: Boolean) {
|
override fun onToolbarVisibilityChange(visible: Boolean) {
|
||||||
if (photoView == null || !userVisibleHint) {
|
if (photoView == null || !userVisibleHint || captionSheet == null) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
isDescriptionVisible = showingDescription && visible
|
isDescriptionVisible = showingDescription && visible
|
||||||
|
@ -180,7 +180,7 @@ class ViewImageFragment : ViewMediaFragment() {
|
||||||
captionSheet.animate().alpha(alpha)
|
captionSheet.animate().alpha(alpha)
|
||||||
.setListener(object : AnimatorListenerAdapter() {
|
.setListener(object : AnimatorListenerAdapter() {
|
||||||
override fun onAnimationEnd(animation: Animator) {
|
override fun onAnimationEnd(animation: Animator) {
|
||||||
captionSheet.visible(isDescriptionVisible)
|
captionSheet?.visible(isDescriptionVisible)
|
||||||
animation.removeListener(this)
|
animation.removeListener(this)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue