Repository navigation
feat(trade): replace swap recommendations with categorized list - #6868
SeniorZhai wants to merge 6 commits into
Conversation
|
AI review done for Quality: Ready to merge based on source review. The fragment consumes autofocus after the first request, and market selection can request it again.
|
| text = inputText, | ||
| title = stringResource(id = R.string.swap_send), | ||
| readOnly = false, | ||
| autoFocus = autoFocus, |
There was a problem hiding this comment.
Scrolling away from the amount field and back reopens the keyboard and hides the recommendations.
TradeLayout is now the trade_layout lazy item, and each market row is its own item, so the amount field is disposed once it leaves the viewport. autoFocus stays true for the whole screen: TradeFragment.shouldAutoFocusAmount() sets it when Simple Trade opens with an input or output asset, and observeTradeMarketSelection() sets it again when a market is picked. Nothing clears it. On the next composition, InputContent's LaunchedEffect(autoFocus) in InputTextField.kt calls requestFocus() and keyboardController.show(). onFocusChanged then sets isSendFocused, and shouldShowSwapRecommendedMarketCards drops the list because the field is focused or the keyboard is visible.
Treat autofocus as one-shot in state that survives disposal of this item (SwapContent, or autoFocusAmount on TradeFragment). Clear it after the first focus request, and set it again only for an explicit action such as selecting a market.
…ed-market-list # Conflicts: # app/src/main/java/one/mixin/android/ui/home/web3/trade/SwapContent.kt
There was a problem hiding this comment.
AI review · GPT + Grok · 56cd75d
No confirmed regressions in the changes since the previous review. Whitespace checks passed for both diff ranges. Compilation and trade unit tests were blocked during Gradle setup by the unavailable wrapper distribution and an uncached Foojay plugin in the offline fallback.
No description provided.