fix: placeholder cover text, indexing timing, TOC long-press, cache deletion UI
- Fix fp4 fixed-point misuse in PlaceholderCoverGenerator (advanceX is 12.4 fixed-point, not pixels) causing only first letter of each word to render - Remove duplicate silentIndexNextChapterIfNeeded() call from loop() that blocked UI before render, preventing the indexing indicator from showing - Fix indexing icon Y position to align within the status bar - Add ignoreNextConfirmRelease to EpubReaderChapterSelectionActivity so long-press confirm release doesn't immediately select the first TOC item - Reload recent books after cache deletion in HomeActivity and clear stale ignoreNextConfirmRelease flag to fix "no open books" and double-press bugs Made-with: Cursor
This commit is contained in:
@@ -381,8 +381,6 @@ void EpubReaderActivity::loop() {
|
||||
} else {
|
||||
pageTurn(true);
|
||||
}
|
||||
|
||||
silentIndexNextChapterIfNeeded();
|
||||
}
|
||||
|
||||
// Translate an absolute percent into a spine index plus a normalized position
|
||||
@@ -454,8 +452,10 @@ void EpubReaderActivity::onReaderMenuConfirm(EpubReaderMenuActivity::MenuAction
|
||||
case EpubReaderMenuActivity::MenuAction::SELECT_CHAPTER: {
|
||||
const int spineIdx = currentSpineIndex;
|
||||
const std::string path = epub->getPath();
|
||||
const bool consumeRelease = ignoreNextConfirmRelease;
|
||||
startActivityForResult(
|
||||
std::make_unique<EpubReaderChapterSelectionActivity>(renderer, mappedInput, epub, path, spineIdx),
|
||||
std::make_unique<EpubReaderChapterSelectionActivity>(renderer, mappedInput, epub, path, spineIdx,
|
||||
consumeRelease),
|
||||
[this](const ActivityResult& result) {
|
||||
if (!result.isCancelled && currentSpineIndex != std::get<ChapterResult>(result.data).spineIndex) {
|
||||
RenderLock lock(*this);
|
||||
@@ -1203,7 +1203,7 @@ void EpubReaderActivity::renderStatusBar() const {
|
||||
if (SETTINGS.indexingDisplay == CrossPointSettings::INDEXING_DISPLAY::INDEXING_STATUS_TEXT) {
|
||||
renderer.drawText(SMALL_FONT_ID, indicatorX, textY, tr(STR_INDEXING));
|
||||
} else if (SETTINGS.indexingDisplay == CrossPointSettings::INDEXING_DISPLAY::INDEXING_STATUS_ICON) {
|
||||
renderer.drawIcon(kIndexingIcon, indicatorX, textY - kIndexingIconSize + 2, kIndexingIconSize, kIndexingIconSize);
|
||||
renderer.drawIcon(kIndexingIcon, indicatorX, textY + 2, kIndexingIconSize, kIndexingIconSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user