Suppress status-bar updates if nothing had changed

This commit is contained in:
jpirnay
2026-05-19 21:28:43 +02:00
parent 102ff5f745
commit 9b6d77821a
9 changed files with 105 additions and 3 deletions
+5
View File
@@ -60,6 +60,10 @@ class MdReaderActivity final : public Activity {
void renderPage();
void renderStatusBar() const;
// See EpubReaderActivity for rationale — suppresses no-op minute-tick re-renders.
mutable int lastStatusBarPage = -1;
mutable int lastStatusBarBattery = -1;
mutable int lastStatusBarClockMinute = -1;
void initializeReader();
bool loadPageAtOffset(size_t offset, bool startInCodeBlock, std::vector<RenderedLine>& outLines, size_t& nextOffset,
@@ -91,5 +95,6 @@ class MdReaderActivity final : public Activity {
void loop() override;
void render(RenderLock&&) override;
bool isReaderActivity() const override { return true; }
bool shouldSkipPeriodicUpdate() const override;
void onButtonAction(CrossPointSettings::BUTTON_ACTION action) override;
};