Skip to content

Refine price alert flow#6262

Merged
crossle merged 7 commits intomasterfrom
feature/price-alert-flow
Apr 3, 2026
Merged

Refine price alert flow#6262
crossle merged 7 commits intomasterfrom
feature/price-alert-flow

Conversation

@SeniorZhai
Copy link
Copy Markdown
Member

No description provided.

@SeniorZhai SeniorZhai added testing Now testing, but you can review and removed testing Now testing, but you can review labels Mar 30, 2026
@SeniorZhai SeniorZhai requested a review from Copilot April 1, 2026 05:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the wallet price-alert UI flow by renaming the “All Alerts” screen to “Price Alerts” and simplifying navigation to start directly on the aggregated alerts list (removing the per-asset AlertPage screen).

Changes:

  • Replace the All_Alert string with a new Price_Alerts string (EN + zh-CN) and update the screen title usage.
  • Remove AlertPage and its navigation route; start AlertFragment on the All destination instead.
  • Initialize the alerts list filter (coins) from the passed-in coin.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/src/main/res/values/strings.xml Rename/replace the alerts screen title string to “Price Alerts”.
app/src/main/res/values-zh-rCN/strings.xml zh-CN translation update for the new “Price Alerts” string key.
app/src/main/java/one/mixin/android/ui/wallet/alert/AllAlertPage.kt Update PageScaffold title to use R.string.Price_Alerts.
app/src/main/java/one/mixin/android/ui/wallet/alert/AlertPage.kt Remove the per-asset alert page implementation.
app/src/main/java/one/mixin/android/ui/wallet/alert/AlertFragment.kt Remove Alert destination and switch start destination to All; set initial coins filter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 55 to 57
enum class AlertDestination {
Alert, All, Edit,
All, Edit,
}
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the Alert destination from the NavHost can crash state restoration (e.g., process recreation or app update) if a previously-saved back stack contains the old "Alert" route; Navigation will try to restore a destination that no longer exists. Consider keeping an Alert route that redirects to All (or keeping the enum value + composable) for backward compatibility, at least for one release.

Copilot uses AI. Check for mistakes.
Comment on lines 70 to +72
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
coins = setOf(coin)
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coins is initialized to emptySet() for the first composition and then set to setOf(coin) in onViewCreated(), which can briefly start collecting all alert groups (and potentially render an unfiltered UI) before switching to the single-coin filtered flow. Initialize coins before setContent (e.g., in onCreate, or set the initial state from args) to avoid unnecessary collection/flicker.

Suggested change
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
coins = setOf(coin)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
coins = setOf(coin)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

Copilot uses AI. Check for mistakes.
@SeniorZhai SeniorZhai force-pushed the feature/price-alert-flow branch from d23e842 to 3e99318 Compare April 2, 2026 14:45
@crossle crossle merged commit 2c67d57 into master Apr 3, 2026
3 checks passed
@crossle crossle deleted the feature/price-alert-flow branch April 3, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants