Swap select recents#458
Open
gemdev111 wants to merge 9 commits into
Open
Conversation
Make UpdateRecentAsset symmetric with GetRecentAssets and ClearRecentAssets, which already resolve the active wallet internally. The coordinator now reads the session wallet itself instead of taking a walletId, so callers (and the perpetuals view model) no longer have to thread it through.
Record a recent activity when a perpetual is opened, and surface recent perpetuals as a chip row when entering search (matching iOS). Selecting a recent navigates without re-recording (no reordering), and the "Recent" header opens the shared recents sheet for the full list. Add a centered "No markets found" empty state (SearchPerpetuals) shown only while searching, with the standard search icon + "check spelling" subtitle. Recents hide once a query is typed, and search state is retained across the perpetual-details round-trip.
Show a centered "No markets found" overlay when a search returns nothing, using a new .search(type: .perpetuals) empty type, replacing the inline placeholder text and its lonely "Markets" section header. Hide recents once a query is typed so the empty state stands alone, and drop the now-unused emptyText path from PerpetualSectionView.
# Conflicts: # android/features/perpetual/presents/build.gradle.kts # android/features/perpetual/presents/src/main/kotlin/com/gemwallet/android/features/perpetual/views/market/PerpetualMarketNavScreen.kt
New RecentActivityType/RecentType variant to distinguish assets picked in the swap selector from completed swaps. Added to the core enum, regenerated iOS/Android bindings, and Android's hand-written RecentType.
Picking an asset in the swap pay/receive selector records a SwapSelect recent (SelectAssetType.swap -> .swapSelect), and the selector shows recents scoped to [swapSelect, swap]. Selecting an existing recent completes without re-recording, matching the other selectors. Completed swaps keep their distinct .swap type. Adds SelectAssetType mapping tests.
The swap selector records a SwapSelect recent on pick and shows recents scoped to [SwapSelect, Swap] via an overridable recentTypes on BaseAssetSelectViewModel. Re-tapping a recent does not re-record. Completed swaps keep RecentType.Swap.
RecentsSceneViewModel clear now clears only the types the sheet was opened with instead of all recent types, so clearing from the swap (or perpetual) selector no longer wipes unrelated recents.
# Conflicts: # android/gemcore/src/main/kotlin/com/gemwallet/android/model/RecentType.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #457