refactor: simplify popup logic in renderScreen function

This commit is contained in:
Arthur Tazhitdinov 2026-01-26 15:12:21 +05:00
parent 192acba809
commit adda1954b9

View File

@ -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,