Skip to content

Refactor Android Rewards actions into the view model - #1541

Merged
gemdev111 merged 5 commits into
mainfrom
refactor/android-rewards-action
Oct 13, 2026
Merged

gemdev111 merged 5 commits into
mainfrom
refactor/android-rewards-action

Conversation

@gemdev111

@gemdev111 gemdev111 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Consolidated the Rewards screen's nine callbacks into one RewardsAction.

The view model now owns the toast, the errors, the points check and the code sheets, as on iOS.

Activating a code from the sheet now shows Done.

Consolidated the Rewards screen's nine callbacks into one RewardsAction.

The view model now shows the toast, the error and the points check, as on iOS.

Activating a code from the dialog now shows Done.
@gemdev111 gemdev111 self-assigned this Oct 13, 2026
The create and redeem code sheets no longer pass results back through callbacks. The view model owns which sheet is open, the spinner and the error, as iOS does.
The view model guards and resets the in-flight flag as the security, sign-message and import view models do, and names it like the price alerts refresh flag.
The create and redeem code dialogs were the same text field, Done button and spinner under different titles. iOS draws both with one TextInputScene. Decorative icons no longer carry a text description, and the emoji sizes are named.
import uniffi.gemstone.GemRewardsIntroItem
import uniffi.gemstone.GemRewardsInviteAction

private val giftEmojiSize = 64.sp

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we reuse with existing sizes?

The gift and intro emojis used their own 64 sp and 26 sp. They now use displayLarge and titleLarge; titleLarge is the 22 sp of the title2 style iOS uses for the same intro emojis.
@gemdev111
gemdev111 merged commit 9ee385a into main Oct 13, 2026
2 checks passed
@gemdev111
gemdev111 deleted the refactor/android-rewards-action branch October 13, 2026 18:25
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.

2 participants