-
Notifications
You must be signed in to change notification settings - Fork 487
Description
Checklist
- I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
- I made sure that there are no existing issues - open or closed - which I could contribute my information to.
- I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- This issue contains only one bug.
- I have read and understood the contribution guidelines.
Affected version
0.7
Steps to reproduce the bug
Steps to reproduce the bug
- Launch the app fresh (first install or after clearing storage)
- Begin onboarding
- Switch to Light Mode or Dark Mode
- Observe that the onboarding progress is lost and restarts or behaves unexpectedly
Expected behavior
The app should preserve the onboarding state and internal flags (e.g. onboardingState, isBluetoothLoading, etc.) across configuration changes such as screen rotation.
Actual behavior
Activities get recreated on configuration change;
Since all onboarding-related state variables are stored as mutable variables inside MainActivity (e.g. var onboardingState by mutableStateOf(...)), they are lost during configuration changes. The onboarding flow resets or behaves inconsistently.
Screenshots/Screen recordings
Screen_recording_20250714_223146.mp4
Affected Android/Custom ROM version
No response
Affected device model
No response
Additional information
This issue is caused by storing non-persisted UI state (like onboardingState, isBluetoothLoading, bluetoothStatus, etc.) inside MainActivity.
Since MainActivity gets recreated on configuration change, all these variables are reset unless manually saved and restored (e.g. via rememberSaveable, SavedStateHandle, or ViewModel).
A recommended solution would be to move the state into a ViewModel and persist it since ViewModels survive configuration changes