Avatar generation can take long, so better check if ChooseAccountDialogFragment is still active

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2021-05-06 07:28:55 +02:00
parent 87b8c1342f
commit 3ceb0b359e
No known key found for this signature in database
GPG Key ID: 0E00D4D47D0C5AF7

View File

@ -193,7 +193,9 @@ class ChooseAccountDialogFragment :
}
override fun avatarGenerated(avatarDrawable: Drawable?, callContext: Any?) {
binding.currentAccount.userIcon.setImageDrawable(avatarDrawable)
if (_binding != null) {
binding.currentAccount.userIcon.setImageDrawable(avatarDrawable)
}
}
override fun onAccountClicked(user: User?) {