mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 23:27:38 +03:00
refactor: simplify popup logic in renderScreen function
This commit is contained in:
parent
192acba809
commit
adda1954b9
@ -285,13 +285,7 @@ void EpubReaderActivity::renderScreen() {
|
|||||||
viewportHeight, SETTINGS.hyphenationEnabled)) {
|
viewportHeight, SETTINGS.hyphenationEnabled)) {
|
||||||
Serial.printf("[%lu] [ERS] Cache not found, building...\n", millis());
|
Serial.printf("[%lu] [ERS] Cache not found, building...\n", millis());
|
||||||
|
|
||||||
bool popupShown = false;
|
const auto popupFn = [this]() { ScreenComponents::drawPopup(renderer, "Indexing..."); };
|
||||||
const auto popupFn = [this, &popupShown]() {
|
|
||||||
if (!popupShown) {
|
|
||||||
ScreenComponents::drawPopup(renderer, "Indexing...");
|
|
||||||
popupShown = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!section->createSectionFile(SETTINGS.getReaderFontId(), SETTINGS.getReaderLineCompression(),
|
if (!section->createSectionFile(SETTINGS.getReaderFontId(), SETTINGS.getReaderLineCompression(),
|
||||||
SETTINGS.extraParagraphSpacing, SETTINGS.paragraphAlignment, viewportWidth,
|
SETTINGS.extraParagraphSpacing, SETTINGS.paragraphAlignment, viewportWidth,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user