mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
## Summary
* refactors Indexing popups into ScreenComponents (they had different
implementations in different files)
* removes Indexing popup for small chapters
* only show Indexing popup (without progress bar) for large chapters
(using same minimum file size condition as for progress bar before)
## Additional Context
* Having to show even single popup message and redraw the screen slows
down the flow significantly
* Testing results:
* Opening large chapter with progress bar - 11 seconds
* Same chapter without progress bar, only single Indexing popup - 5
seconds
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY>**_
19 lines
502 B
C++
19 lines
502 B
C++
#pragma once
|
|
#include "../Activity.h"
|
|
|
|
class Bitmap;
|
|
|
|
class SleepActivity final : public Activity {
|
|
public:
|
|
explicit SleepActivity(GfxRenderer& renderer, MappedInputManager& mappedInput)
|
|
: Activity("Sleep", renderer, mappedInput) {}
|
|
void onEnter() override;
|
|
|
|
private:
|
|
void renderDefaultSleepScreen() const;
|
|
void renderCustomSleepScreen() const;
|
|
void renderCoverSleepScreen() const;
|
|
void renderBitmapSleepScreen(const Bitmap& bitmap) const;
|
|
void renderBlankSleepScreen() const;
|
|
};
|