Refactor: Migrate MainViewModel to use StateFlow

This commit refactors the `MainViewModel` to use `StateFlow` instead of `mutableStateOf` for managing its observable properties. This change improves the way UI state is handled and observed, aligning with modern Android development best practices.

Additionally, `OnboardingState.kt` has been moved to the `onboarding` package for better organization.
This commit is contained in:
Mohamad Hamade
2025-07-16 01:13:42 +03:00
parent 245181d736
commit d730acbb79
3 changed files with 86 additions and 48 deletions
@@ -0,0 +1,12 @@
package com.bitchat.android.onboarding
enum class OnboardingState {
CHECKING,
BLUETOOTH_CHECK,
LOCATION_CHECK,
PERMISSION_EXPLANATION,
PERMISSION_REQUESTING,
INITIALIZING,
COMPLETE,
ERROR
}