Commit Graph
18 Commits
Author SHA1 Message Date
Faded 7972439c14 Merge branch 'main' into fix/wrong-cursor-location 2025-07-18 05:19:19 +05:00
Mohamad Hamade d730acbb79 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.
2025-07-16 01:13:42 +03:00
Mohamad Hamade 245181d736 Refactor: Introduce MainViewModel for onboarding state management
This commit introduces a `MainViewModel` to manage the UI state for the onboarding flow. This change centralizes the onboarding state (including Bluetooth status, location status, error messages, and loading indicators) within the ViewModel, allowing it to survive configuration changes and simplifying state management within `MainActivity`.

Key changes:
- Created `MainViewModel.kt` to hold and manage onboarding-related UI state.
- Moved onboarding state variables (e.g., `onboardingState`, `bluetoothStatus`, `locationStatus`) from `MainActivity` to `MainViewModel`.
- Updated `MainActivity` to observe and update onboarding state through the `MainViewModel`.
- Created `OnboardingState.kt` to define the possible states of the onboarding process.
- Ensured that the onboarding process is not restarted on configuration changes by checking `mainViewModel.onboardingState` before initiating.
2025-07-15 02:24:41 +03:00
Faded fe57c5684e feat(battery): add battery optimization management for background reliability
Add battery optimization permission and management system to ensure app runs reliably in background:
- Add REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission
- Create BatteryOptimizationManager to handle battery optimization checks and requests
- Add battery optimization UI screens and flow in onboarding
- Integrate battery optimization checks into MainActivity flow
2025-07-14 14:23:59 +05:00
callebtc 930081bba0 add location services check 2025-07-13 20:27:43 +02:00
callebtc 887ca0119e Merge branch 'main' into adjust-scan-intervals 2025-07-13 19:43:58 +02:00
callebtc 2a0f84b53b adjust scan intervals and reduce logging 2025-07-13 17:16:31 +02:00
callebtcandGitHub 0d54d60dd5 Merge pull request #60 from prudhvir3ddy/prudhvir3ddy/upgrade_deps
Upgrade compileSDK, kotlin, AGP, compose, core libs
2025-07-13 17:09:00 +02:00
callebtc ad6dc3680b permissions layout 2025-07-12 17:40:25 +02:00
callebtc d490393de6 back gesture works 2025-07-12 17:32:08 +02:00
callebtc 035273011f fix startup 2025-07-12 15:42:37 +02:00
prudhvir3ddy 9bdfa31d55 Upgrade compileSDK, kotlin, AGP, compose, core libs 2025-07-11 17:15:54 +05:30
callebtc ef6a815b4c bluetooth check 2025-07-10 14:01:42 +02:00
callebtc 3cee97ccc7 check bluetooth 2025-07-10 13:49:52 +02:00
callebtc f9f56794d3 onboarding 2025-07-10 13:15:28 +02:00
callebtc 37d605b934 fix notifications 2025-07-10 12:48:04 +02:00
callebtc dd8aa083b9 power saving 2025-07-09 15:47:54 +02:00
callebtc d6a4e122b4 init 2025-07-08 20:37:46 +02:00