Fix bug: transfer source drop down automatically closing to update profile image
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 6s
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 6s
This commit is contained in:
@@ -1646,10 +1646,12 @@ class TransferFragment : Fragment() {
|
||||
acc.bank == "MIB" -> {
|
||||
val hash = acc.profileImageHash
|
||||
val cached = hash?.let { dropdownProfileImageCache[it] }
|
||||
val imageView = b.ivDropdownCardLogo
|
||||
imageView.tag = hash
|
||||
if (cached != null) {
|
||||
b.ivDropdownCardLogo.setImageBitmap(cached)
|
||||
imageView.setImageBitmap(cached)
|
||||
} else {
|
||||
b.ivDropdownCardLogo.setImageResource(R.drawable.mib_logo)
|
||||
imageView.setImageResource(R.drawable.mib_logo)
|
||||
if (hash != null) {
|
||||
val app = requireActivity().application as BasedBankApp
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
@@ -1663,12 +1665,12 @@ class TransferFragment : Fragment() {
|
||||
}
|
||||
if (bitmap != null) {
|
||||
dropdownProfileImageCache[hash] = bitmap
|
||||
accountDropdownAdapter?.notifyDataSetChanged()
|
||||
if (imageView.tag == hash) imageView.setImageBitmap(bitmap)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
b.ivDropdownCardLogo.visibility = View.VISIBLE
|
||||
imageView.visibility = View.VISIBLE
|
||||
}
|
||||
else -> b.ivDropdownCardLogo.visibility = View.GONE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user