Skip to content

refactor: prepare Android ViewModel creation boundary [WPB-23495]#4868

Open
Garzas wants to merge 1 commit into
chore/metro-build-infrastructurefrom
refactor/android-viewmodel-creation-boundary
Open

refactor: prepare Android ViewModel creation boundary [WPB-23495]#4868
Garzas wants to merge 1 commit into
chore/metro-build-infrastructurefrom
refactor/android-viewmodel-creation-boundary

Conversation

@Garzas
Copy link
Copy Markdown
Contributor

@Garzas Garzas commented May 25, 2026

https://wearezeta.atlassian.net/browse/WPB-23495


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Summary

Prepares the old login ViewModel creation boundary for the Metro migration.

This PR removes direct SavedStateHandle.navArgs() usage from the old login base/email/SSO ViewModels and passes LoginNavArgs explicitly through assisted ViewModel creation. It also moves saved login input persistence behind a small LoginSavedInputStore boundary so the ViewModels no longer own the Android saved-state mechanism directly.

Changes

  • Add wireViewModel(...) helpers for assisted Hilt ViewModel creation from Compose.
  • Change LoginViewModel, LoginEmailViewModel, and LoginSSOViewModel to receive explicit LoginNavArgs.
  • Add LoginSavedInputStore and SavedStateLoginSavedInputStore.
  • Update old login and new-login password call sites to create assisted LoginEmailViewModel / LoginSSOViewModel with nav args.
  • Keep SSO Nomad behavior intact while moving auto-login args handling out of direct SavedStateHandle.navArgs() reads.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant