Update status bar immediately on BLE connect/disconnect
Previously the status bar showed 'BT connecting' until the next page turn. Now monitors connection state in loop() and redraws the status bar immediately when connection completes or disconnects, restoring the chapter/book title. The connecting message now takes over the entire title slot instead of prepending to it.
This commit is contained in:
@@ -41,6 +41,11 @@ class EpubReaderActivity final : public Activity {
|
||||
bool showBookmarkMessage = false;
|
||||
bool ignoreNextConfirmRelease = false;
|
||||
bool currentPageBookmarked = false;
|
||||
// BLE connection state the status bar last rendered with; loop() watches for
|
||||
// a flip and redraws the bar so the "BT connecting" placeholder swaps back
|
||||
// to the chapter/book title the moment the connection completes (and
|
||||
// returns on disconnect) instead of waiting for the next page turn.
|
||||
bool statusBarBleConnected = false;
|
||||
bool bookmarkRemoved = false; // true when last toggle removed (controls popup text)
|
||||
std::vector<BookmarkEntry> cachedBookmarks;
|
||||
// Tracks whether this book is currently removed from Recent Books by the
|
||||
|
||||
Reference in New Issue
Block a user