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:
committed by
GitHub
parent
e7e31ac487
commit
e6f5fa43e6
@@ -102,15 +102,15 @@ void TxtReaderActivity::loop() {
|
||||
return;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user