mirror of
https://github.com/pachli/pachli-android.git
synced 2024-12-26 08:44:43 +01:00
It was not checked whether captionSheet is present.
This commit is contained in:
parent
6c382aa5da
commit
8b243a7f05
@ -170,7 +170,7 @@ class ViewImageFragment : ViewMediaFragment() {
|
||||
}
|
||||
|
||||
override fun onToolbarVisibilityChange(visible: Boolean) {
|
||||
if (photoView == null || !userVisibleHint) {
|
||||
if (photoView == null || !userVisibleHint || captionSheet == null) {
|
||||
return
|
||||
}
|
||||
isDescriptionVisible = showingDescription && visible
|
||||
@ -178,7 +178,7 @@ class ViewImageFragment : ViewMediaFragment() {
|
||||
captionSheet.animate().alpha(alpha)
|
||||
.setListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
captionSheet.visible(isDescriptionVisible)
|
||||
captionSheet?.visible(isDescriptionVisible)
|
||||
animation.removeListener(this)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user