Repository navigation
feat(wallet): show clickable users in transfer details - #6915
SeniorZhai wants to merge 4 commits into
Conversation
|
AI review done for Quality: Needs one fix before merge. The Kotlin logic was checked in isolation. Android rendering and tap behavior remain unverified.
|
| } | ||
| if (opponentId.isNotBlank() && !opponentId.startsWith("XIN", ignoreCase = true) && !opponentId.isTransactionHashLike()) { | ||
| lifecycleScope.launch { | ||
| val user = walletViewModel.refreshUser(opponentId) ?: return@launch |
There was a problem hiding this comment.
Opening the details for an uncached counterparty can show a “User not found” toast even though the transaction loaded successfully. refreshUser sends lookup failures to the global error handler before returning null. Use a quiet lookup for this optional profile and keep the existing text when it fails.
| if (opponentId.isNotBlank() && !opponentId.startsWith("XIN", ignoreCase = true) && !opponentId.isTransactionHashLike()) { | ||
| lifecycleScope.launch { | ||
| val user = walletViewModel.refreshUser(opponentId) ?: return@launch | ||
| if (checkDestroyed(fragment) || fromUserItem.tag !== snapshot || user.notMessengerUser()) return@launch |
There was a problem hiding this comment.
Wallet users with identity number 0 stay unclickable in the details. The transaction list already opens their profiles, and showUserBottom already routes them to the non-Messenger profile sheet. Remove this guard so the same counterparty can be opened from either screen.
| val user = walletViewModel.refreshUser(opponentId) ?: return@launch | ||
| if (checkDestroyed(fragment) || fromUserItem.tag !== snapshot || user.notMessengerUser()) return@launch | ||
|
|
||
| fromUserItem.setContent(user) |
There was a problem hiding this comment.
A resolved user with a null fullName replaces the counterparty UUID with a label like null (12345678). The receiver widget interpolates the nullable name directly. Use the identity number or UUID as the label when the name is missing, and keep the row clickable.
There was a problem hiding this comment.
AI review · Codex · 0cba413
The diff and XML checks passed, and an isolated Kotlin harness verified quiet lookup, cancellation, and the missing-name fallback. Android compilation, lint, and unit tests were blocked because Gradle could not resolve the Foojay plugin offline.
| if (opponentId.isNotBlank() && !opponentId.startsWith("XIN", ignoreCase = true) && !opponentId.isTransactionHashLike()) { | ||
| lifecycleScope.launch { | ||
| val user = walletViewModel.refreshUser(opponentId, quiet = true) ?: return@launch | ||
| if (checkDestroyed(fragment) || fromUserItem.tag !== snapshot || user.notMessengerUser()) return@launch |
There was a problem hiding this comment.
Transfer details still leave wallet-only counterparties unclickable. notMessengerUser() is true for identity number 0, so this guard exits before installing the click listener. The transaction list already opens these users’ profiles, and showUserBottom already routes them to the wallet-only profile sheet. Remove the guard so the same counterparty can be opened from details.
No description provided.