Skip to content

refactor: move config, CA install, and Google IP logic into ViewModel…#1425

Open
KianMahmoudi wants to merge 1 commit into
therealaleph:mainfrom
KianMahmoudi:feature/add-mvvm-architecture
Open

refactor: move config, CA install, and Google IP logic into ViewModel…#1425
KianMahmoudi wants to merge 1 commit into
therealaleph:mainfrom
KianMahmoudi:feature/add-mvvm-architecture

Conversation

@KianMahmoudi

Copy link
Copy Markdown

What this PR does

Migrates HomeScreen business logic from Composables to a proper
MVVM architecture.

Changes:

  • Created ConfigRepository and ConfigRepositoryImpl
  • Created CaRepository and CaRepositoryImpl
  • Added Hilt DI module binding both repositories
  • Moved config save/load logic to HomeViewModel
  • Moved Google IP auto-detect logic to HomeViewModel
  • Moved CA certificate install logic to HomeViewModel
  • HomeScreen now observes ViewModel state instead of doing
    direct ConfigStore calls

What stays in the UI layer (intentionally):

  • attachBaseContext locale setup (too early for ViewModel)
  • MhrvVpnService config reading (system component)
  • Activity result launchers for VPN and CA install

@github-actions github-actions Bot added the type: refactor refactor: PR — auto-applied by release-drafter label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: refactor refactor: PR — auto-applied by release-drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant