RvSystem-Monitor icon indicating copy to clipboard operation
RvSystem-Monitor copied to clipboard

Pressing Back did not return to the home screen or exit the app

Open Rickeal-Boss opened this issue 3 months ago • 0 comments

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 → BackHandler is disabled, so the event propagates up to Activity.finish() and the app exits
  • Removed the mutableStateListOf dependency and replaced it with two simple boolean flags

Rickeal-Boss avatar Aug 15 '26 11:08 Rickeal-Boss