A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

authored by

Arthur Tazhitdinov and committed by
GitHub
e6f5fa43 e7e31ac4

+12 -12
+4 -4
src/activities/reader/EpubReaderActivity.cpp
··· 204 204 xSemaphoreGive(renderingMutex); 205 205 } 206 206 207 - // Long press BACK (1s+) goes directly to home 207 + // Long press BACK (1s+) goes to file selection 208 208 if (mappedInput.isPressed(MappedInputManager::Button::Back) && mappedInput.getHeldTime() >= goHomeMs) { 209 - onGoHome(); 209 + onGoBack(); 210 210 return; 211 211 } 212 212 213 - // Short press BACK goes to file selection 213 + // Short press BACK goes directly to home 214 214 if (mappedInput.wasReleased(MappedInputManager::Button::Back) && mappedInput.getHeldTime() < goHomeMs) { 215 - onGoBack(); 215 + onGoHome(); 216 216 return; 217 217 } 218 218
+4 -4
src/activities/reader/TxtReaderActivity.cpp
··· 102 102 return; 103 103 } 104 104 105 - // Long press BACK (1s+) goes directly to home 105 + // Long press BACK (1s+) goes to file selection 106 106 if (mappedInput.isPressed(MappedInputManager::Button::Back) && mappedInput.getHeldTime() >= goHomeMs) { 107 - onGoHome(); 107 + onGoBack(); 108 108 return; 109 109 } 110 110 111 - // Short press BACK goes to file selection 111 + // Short press BACK goes directly to home 112 112 if (mappedInput.wasReleased(MappedInputManager::Button::Back) && mappedInput.getHeldTime() < goHomeMs) { 113 - onGoBack(); 113 + onGoHome(); 114 114 return; 115 115 } 116 116
+4 -4
src/activities/reader/XtcReaderActivity.cpp
··· 102 102 } 103 103 } 104 104 105 - // Long press BACK (1s+) goes directly to home 105 + // Long press BACK (1s+) goes to file selection 106 106 if (mappedInput.isPressed(MappedInputManager::Button::Back) && mappedInput.getHeldTime() >= goHomeMs) { 107 - onGoHome(); 107 + onGoBack(); 108 108 return; 109 109 } 110 110 111 - // Short press BACK goes to file selection 111 + // Short press BACK goes directly to home 112 112 if (mappedInput.wasReleased(MappedInputManager::Button::Back) && mappedInput.getHeldTime() < goHomeMs) { 113 - onGoBack(); 113 + onGoHome(); 114 114 return; 115 115 } 116 116