Skip to content

Commit

Permalink
fix: workaround for NPE in ImagesManageActivity.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
VaiTon committed Sep 6, 2021
1 parent 80ede54 commit fed1f54
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -296,13 +296,15 @@ class ImagesManageActivity : BaseActivity() {
.load(url)
.into(binding.imageViewFullScreen, object : Callback {
override fun onSuccess() {
if (_binding == null) return
attacher.update()
scheduleStartPostponedTransition(binding.imageViewFullScreen)
binding.imageViewFullScreen.visibility = View.VISIBLE
stopRefresh()
}

override fun onError(ex: Exception) {
if (_binding == null) return
binding.imageViewFullScreen.visibility = View.VISIBLE
Toast.makeText(this@ImagesManageActivity, resources.getString(R.string.txtConnectionError), Toast.LENGTH_LONG).show()
stopRefresh()
Expand Down

0 comments on commit fed1f54

Please sign in to comment.