fix NullPointerException in ViewImageFragment

main
Conny Duck 6 years ago
parent 2d97fabfeb
commit 8884354999
  1. 2
      app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt

@ -85,7 +85,7 @@ class ViewImageFragment : ViewMediaFragment() {
.into(photoView, object : Callback {
override fun onSuccess() {
// if we loaded image from disk, we should check that view is attached.
if (ViewCompat.isAttachedToWindow(photoView)) {
if (photoView?.isAttachedToWindow == true) {
finishLoadingSuccessfully()
} else {
// if view is not attached yet, wait for an attachment and

Loading…
Cancel
Save