From adda1954b99b003f8d97abca52bbb2473859aa18 Mon Sep 17 00:00:00 2001 From: Arthur Tazhitdinov Date: Mon, 26 Jan 2026 15:12:21 +0500 Subject: [PATCH] refactor: simplify popup logic in renderScreen function --- src/activities/reader/EpubReaderActivity.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index c95d271b..c7b533ee 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -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,