feat(ux): invert BACK button behavior in reader activities (#726)

## Summary

* Inverts back button behaviour while reading - short press to go home,
long press to open file browser

## Additional Context

* It seems counterintuitive that going into a book from home screen and
pressing back doesn’t take you back to the home screen. With the recent
books now displayed in the home view and a separate recents view, going
directly to the file browser is less necessary.
This commit is contained in:
Arthur Tazhitdinov
2026-02-07 18:17:00 +03:00
committed by GitHub
parent e7e31ac487
commit e6f5fa43e6
3 changed files with 12 additions and 12 deletions

View File

@@ -102,15 +102,15 @@ void XtcReaderActivity::loop() {
}
}
// Long press BACK (1s+) goes directly to home
// Long press BACK (1s+) goes to file selection
if (mappedInput.isPressed(MappedInputManager::Button::Back) && mappedInput.getHeldTime() >= goHomeMs) {
onGoHome();
onGoBack();
return;
}
// Short press BACK goes to file selection
// Short press BACK goes directly to home
if (mappedInput.wasReleased(MappedInputManager::Button::Back) && mappedInput.getHeldTime() < goHomeMs) {
onGoBack();
onGoHome();
return;
}