contact picker recents will not put most recent contact top
Auto Tag on Version Change / check-version (push) Failing after 10m46s

This commit is contained in:
2026-06-13 23:17:57 +05:00
parent 3182e14873
commit e997969070
@@ -984,17 +984,31 @@ class TransferFragment : Fragment() {
updateTransferButton()
val contact = contacts.firstOrNull { it.benefAccount == accountNumber }
if (contact != null) {
RecentsCache.save(requireContext(), RecentPick(
accountNumber = contact.benefAccount,
displayName = contact.benefNickName,
subtitle = subtitle,
colorHex = colorHex,
imageHash = imageHash,
isProfileImage = false
))
if (imageHash != null) loadToPhoto(imageHash, isProfile = false)
val recentImageHash: String?
val recentIsProfileImage: Boolean
when {
ownAccount != null -> {
recentImageHash = ownAccount.profileImageHash
recentIsProfileImage = true
}
contact != null -> {
recentImageHash = contact.customerImgHash ?: imageHash
recentIsProfileImage = false
}
else -> {
recentImageHash = imageHash
recentIsProfileImage = false
}
}
RecentsCache.save(requireContext(), RecentPick(
accountNumber = accountNumber,
displayName = displayName,
subtitle = subtitle,
colorHex = colorHex,
imageHash = recentImageHash,
isProfileImage = recentIsProfileImage
))
if (contact != null && imageHash != null) loadToPhoto(imageHash, isProfile = false)
}
private fun prefillToFromContact(accountNumber: String, label: String) {