Review comments
This commit is contained in:
@@ -209,10 +209,10 @@ void OpdsBookBrowserActivity::loop() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
buttonNavigator.onNextList(formatSelectorIndex, static_cast<int>(entry.acquisitionLinks.size()),
|
buttonNavigator.onNextList({MappedInputManager::Button::Down}, formatSelectorIndex,
|
||||||
[this] { requestUpdate(); });
|
static_cast<int>(entry.acquisitionLinks.size()), [this] { requestUpdate(); });
|
||||||
buttonNavigator.onPreviousList(formatSelectorIndex, static_cast<int>(entry.acquisitionLinks.size()),
|
buttonNavigator.onPreviousList({MappedInputManager::Button::Up}, formatSelectorIndex,
|
||||||
[this] { requestUpdate(); });
|
static_cast<int>(entry.acquisitionLinks.size()), [this] { requestUpdate(); });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -287,7 +287,8 @@ void ButtonNavigator::onListNav(const Buttons& buttons, const bool forward, int&
|
|||||||
|
|
||||||
if (isDouble) {
|
if (isDouble) {
|
||||||
// Restore to position before the first press so the total movement is exactly listJumpCount.
|
// Restore to position before the first press so the total movement is exactly listJumpCount.
|
||||||
selectedIndex = indexBeforePress;
|
// Guard against a stale indexBeforePress if totalItems shrank since the single press stored it.
|
||||||
|
selectedIndex = (indexBeforePress >= 0 && indexBeforePress < totalItems) ? indexBeforePress : selectedIndex;
|
||||||
for (int i = 0; i < listJumpCount; ++i) {
|
for (int i = 0; i < listJumpCount; ++i) {
|
||||||
const int next =
|
const int next =
|
||||||
forward ? (selectablePredicate ? nextIndex(selectedIndex) : nextIndex(selectedIndex, totalItems))
|
forward ? (selectablePredicate ? nextIndex(selectedIndex) : nextIndex(selectedIndex, totalItems))
|
||||||
|
|||||||
Reference in New Issue
Block a user