Repository navigation
Wallet search redesign - #6799
Conversation
Remove empty-state market recommendations and cap recent chips at three rows using the existing token chip spacing. Limit balance width to half the screen, open Earn with the selected production, and close wallet search when opening market search.
Give two wide chips half the row, and let one wide chip use the space beside shorter chips so long balances stay visible.
List up to six recent tokens when the query is empty, seeded from send and receive until this wallet has its own list.
e958a59 to
3e7823a
Compare
…redesign # Conflicts: # app/src/main/res/values-es/strings.xml # app/src/main/res/values-in/strings.xml # app/src/main/res/values-ja/strings.xml # app/src/main/res/values-ms/strings.xml # app/src/main/res/values-ru/strings.xml
81e5ef6 to
b895d77
Compare
|
@copilot resolve the merge conflicts in this pull request |
|
AI review done for Quality: Needs a fix before merge. Static review found no new defects from the merge with
|
…redesign # Conflicts: # app/src/main/res/values-es/strings.xml # app/src/main/res/values-in/strings.xml # app/src/main/res/values-ja/strings.xml # app/src/main/res/values-ko/strings.xml # app/src/main/res/values-ms/strings.xml # app/src/main/res/values-ru/strings.xml # app/src/main/res/values-zh-rCN/strings.xml # app/src/main/res/values-zh-rTW/strings.xml # app/src/main/res/values/strings.xml Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Merged |
…redesign # Conflicts: # app/src/main/res/values-es/strings.xml # app/src/main/res/values-in/strings.xml # app/src/main/res/values-ja/strings.xml # app/src/main/res/values-ko/strings.xml # app/src/main/res/values-ms/strings.xml # app/src/main/res/values-ru/strings.xml # app/src/main/res/values-zh-rCN/strings.xml # app/src/main/res/values-zh-rTW/strings.xml # app/src/main/res/values/strings.xml
There was a problem hiding this comment.
AI review · Codex (Grok failed) · 4a4a8c9
Needs a fix before merge: upgrading drops the previous wallet search history. git diff --check passed. Compilation and the WalletSearch unit tests were not run because the Gradle wrapper cannot reach services.gradle.org.
|
|
||
| private fun readRecentSearches(): List<RecentSearch> = | ||
| runCatching { | ||
| preferences.getString(PREF_WALLET_SEARCH_RECENT, null)?.let { |
There was a problem hiding this comment.
Existing wallet search history is never migrated. readRecentSearches() only parses PREF_WALLET_SEARCH_RECENT, and loadRecentSearches() only supplements that with PREF_WALLET_SEND and PREF_WALLET_RECEIVE. Nothing reads PREF_RECENT_SEARCH_ASSETS, which the old WalletSearchFragment.loadRecentSearchAssets() showed under Recent searches and which WalletViewModel.updateRecentSearchAssets() still stores as =-separated asset ids. After upgrade, users who searched tokens they never sent or received see an empty Recent section even though those ids are still on disk.
On first load, when PREF_WALLET_SEARCH_RECENT is absent and ${PREF_WALLET_SEARCH_RECENT}_cleared is false, split PREF_RECENT_SEARCH_ASSETS on = and seed the new list as RecentSearch(RecentSearchType.ASSET, primaryKey = id) in that order. Do not seed again after the user clears history.
…redesign # Conflicts: # app/src/main/java/one/mixin/android/ui/home/web3/market/MarketSearchPage.kt
|
|
||
| private fun readRecentSearches(): List<RecentSearch> = | ||
| runCatching { | ||
| preferences.getString(PREF_WALLET_SEARCH_RECENT, null)?.let { |
There was a problem hiding this comment.
Upgrading still drops wallet search history stored only in PREF_RECENT_SEARCH_ASSETS. The old screen read that key as =-separated asset IDs, while this reader loads the new JSON list and only supplements it with send and receive history. When the new key is absent and history has never been cleared, migrate the legacy IDs in order as ASSET entries.
|
|
||
| private fun readRecentSearches(): List<RecentSearch> = | ||
| runCatching { | ||
| preferences.getString(PREF_WALLET_SEARCH_RECENT, null)?.let { |
There was a problem hiding this comment.
Upgrading still drops wallet search history stored only in PREF_RECENT_SEARCH_ASSETS. The old screen reads that key as =-separated asset IDs, while the new screen reads the new JSON key and supplements it with send and receive history. When the JSON key is absent and the user has never cleared history, migrate the legacy IDs in order as ASSET entries.
No description provided.