fix ghosting regression when opening subactivity from within reader
This commit is contained in:
@@ -218,6 +218,7 @@ void EpubReaderActivity::loop() {
|
||||
const int bookProgressPercent = clampPercent(static_cast<int>(bookProgress + 0.5f));
|
||||
const bool isCurrentPageStarred = section && bookmarkStore.has(static_cast<uint16_t>(currentSpineIndex),
|
||||
static_cast<uint16_t>(section->currentPage));
|
||||
ReaderUtils::enforceExitFullRefresh(renderer);
|
||||
startActivityForResult(
|
||||
std::make_unique<EpubReaderMenuActivity>(
|
||||
renderer, mappedInput, epub->getTitle(), currentPage, totalPages, bookProgressPercent, SETTINGS.orientation,
|
||||
@@ -263,6 +264,7 @@ void EpubReaderActivity::loop() {
|
||||
if (currentPageFootnotes.size() == 1) {
|
||||
navigateToHref(currentPageFootnotes[0].href, true);
|
||||
} else if (currentPageFootnotes.size() > 1) {
|
||||
ReaderUtils::enforceExitFullRefresh(renderer);
|
||||
startActivityForResult(std::make_unique<EpubReaderFootnotesActivity>(renderer, mappedInput, currentPageFootnotes),
|
||||
[this](const ActivityResult& result) {
|
||||
if (!result.isCancelled) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "EpubReaderMenuActivity.h"
|
||||
|
||||
#include <GfxRenderer.h>
|
||||
#include <HalGPIO.h>
|
||||
#include <I18n.h>
|
||||
|
||||
#include "KOReaderCredentialStore.h"
|
||||
@@ -234,10 +233,5 @@ void EpubReaderMenuActivity::render(RenderLock&&) {
|
||||
const auto labels = mappedInput.mapLabels(tr(STR_BACK), tr(STR_SELECT), tr(STR_DIR_UP), tr(STR_DIR_DOWN));
|
||||
GUI.drawButtonHints(renderer, labels.btn1, labels.btn2, labels.btn3, labels.btn4);
|
||||
|
||||
if (gpio.deviceIsX3() && !initialHalfRefreshDone) {
|
||||
initialHalfRefreshDone = true;
|
||||
renderer.displayBuffer(HalDisplay::HALF_REFRESH);
|
||||
} else {
|
||||
renderer.displayBuffer();
|
||||
}
|
||||
renderer.displayBuffer();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ class EpubReaderMenuActivity final : public MenuListActivity {
|
||||
int8_t pendingEmbeddedStyleOverride = -1;
|
||||
int8_t pendingImageRenderingOverride = -1;
|
||||
uint8_t pendingTextDarkness = 1;
|
||||
bool initialHalfRefreshDone = false;
|
||||
|
||||
static constexpr const char* pageTurnLabels[] = {"", "1", "3", "6", "12"};
|
||||
|
||||
|
||||
@@ -162,6 +162,7 @@ void TxtReaderActivity::loop() {
|
||||
|
||||
// Open starred pages list via Confirm button
|
||||
if (mappedInput.wasReleased(MappedInputManager::Button::Confirm) && !bookmarkStore.isEmpty()) {
|
||||
ReaderUtils::enforceExitFullRefresh(renderer);
|
||||
startActivityForResult(std::make_unique<StarredPagesActivity>(renderer, mappedInput, bookmarkStore),
|
||||
[this](const ActivityResult& result) {
|
||||
if (!result.isCancelled) {
|
||||
|
||||
@@ -69,6 +69,7 @@ void XtcReaderActivity::loop() {
|
||||
// Enter chapter selection activity
|
||||
if (mappedInput.wasReleased(MappedInputManager::Button::Confirm)) {
|
||||
if (xtc && xtc->hasChapters() && !xtc->getChapters().empty()) {
|
||||
ReaderUtils::enforceExitFullRefresh(renderer);
|
||||
startActivityForResult(
|
||||
std::make_unique<XtcReaderChapterSelectionActivity>(renderer, mappedInput, xtc, currentPage),
|
||||
[this](const ActivityResult& result) {
|
||||
|
||||
Reference in New Issue
Block a user