mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +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)) {
|
||||
Serial.printf("[%lu] [ERS] Cache not found, building...\n", millis());
|
||||
|
||||
bool popupShown = false;
|
||||
const auto popupFn = [this, &popupShown]() {
|
||||
if (!popupShown) {
|
||||
ScreenComponents::drawPopup(renderer, "Indexing...");
|
||||
popupShown = true;
|
||||
}
|
||||
};
|
||||
const auto popupFn = [this]() { ScreenComponents::drawPopup(renderer, "Indexing..."); };
|
||||
|
||||
if (!section->createSectionFile(SETTINGS.getReaderFontId(), SETTINGS.getReaderLineCompression(),
|
||||
SETTINGS.extraParagraphSpacing, SETTINGS.paragraphAlignment, viewportWidth,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user