RvSystem-Monitor
RvSystem-Monitor copied to clipboard
Pressing Back did not return to the home screen or exit the app
The back button behavior when leaving the app was broken: pressing Back did not return to the home screen or exit the app. Instead, it jumped erratically between the HorizontalPager pages (CPU, Memory, Battery).
Before: Maintained a complete pageHistory list; the back button popped back one page at a time.
After:
- Pressing Back on any page other than Home (page 0) → animates back to Home
- Pressing Back on Home →
BackHandleris disabled, so the event propagates up toActivity.finish()and the app exits - Removed the
mutableStateListOfdependency and replaced it with two simple boolean flags