Minor changes to avoid double counting
This commit is contained in:
@@ -917,15 +917,22 @@ void TxtReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BA::BTN_PAGE_FORWARD_10:
|
case BA::BTN_PAGE_FORWARD_10:
|
||||||
|
const int prevPage = currentPage;
|
||||||
currentPage += 10;
|
currentPage += 10;
|
||||||
clampPage();
|
clampPage();
|
||||||
globalReadingSessionTracker().onPageTurn();
|
if (currentPage != prevPage) {
|
||||||
|
globalReadingSessionTracker().onPageTurn();
|
||||||
|
}
|
||||||
requestUpdate();
|
requestUpdate();
|
||||||
break;
|
break;
|
||||||
case BA::BTN_PAGE_BACK_10:
|
case BA::BTN_PAGE_BACK_10:
|
||||||
|
const int prevPage = currentPage;
|
||||||
currentPage -= 10;
|
currentPage -= 10;
|
||||||
clampPage();
|
clampPage();
|
||||||
globalReadingSessionTracker().onPageTurn();
|
if (currentPage != prevPage) {
|
||||||
|
globalReadingSessionTracker().onPageTurn();
|
||||||
|
}
|
||||||
|
|
||||||
requestUpdate();
|
requestUpdate();
|
||||||
break;
|
break;
|
||||||
case BA::BTN_STAR_PAGE:
|
case BA::BTN_STAR_PAGE:
|
||||||
|
|||||||
@@ -535,13 +535,19 @@ void XtcReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BA::BTN_PAGE_FORWARD_10:
|
case BA::BTN_PAGE_FORWARD_10:
|
||||||
|
const uint32_t prevPage = currentPage;
|
||||||
currentPage = (currentPage + 10 < pageCount) ? currentPage + 10 : pageCount - 1;
|
currentPage = (currentPage + 10 < pageCount) ? currentPage + 10 : pageCount - 1;
|
||||||
globalReadingSessionTracker().onPageTurn();
|
if (currentPage != prevPage) {
|
||||||
|
globalReadingSessionTracker().onPageTurn();
|
||||||
|
}
|
||||||
requestUpdate();
|
requestUpdate();
|
||||||
break;
|
break;
|
||||||
case BA::BTN_PAGE_BACK_10:
|
case BA::BTN_PAGE_BACK_10:
|
||||||
|
const uint32_t prevPage = currentPage;
|
||||||
currentPage = (currentPage >= 10) ? currentPage - 10 : 0;
|
currentPage = (currentPage >= 10) ? currentPage - 10 : 0;
|
||||||
globalReadingSessionTracker().onPageTurn();
|
if (currentPage != prevPage) {
|
||||||
|
globalReadingSessionTracker().onPageTurn();
|
||||||
|
}
|
||||||
requestUpdate();
|
requestUpdate();
|
||||||
break;
|
break;
|
||||||
case BA::BTN_NEXT_SECTION:
|
case BA::BTN_NEXT_SECTION:
|
||||||
|
|||||||
Reference in New Issue
Block a user