This commit is contained in:
jpirnay
2026-05-20 00:14:51 +02:00
parent 4b0c99f35d
commit dddb3c1bcb
2 changed files with 8 additions and 12 deletions
@@ -58,15 +58,12 @@ void ReadingStatsBookListActivity::loop() {
}
if (!sortedBooks.empty()) {
buttonNavigator.onNextList(selectedIndex, static_cast<int>(sortedBooks.size()),
[this]() { requestUpdate(); });
buttonNavigator.onPreviousList(selectedIndex, static_cast<int>(sortedBooks.size()),
[this]() { requestUpdate(); });
buttonNavigator.onNextList(selectedIndex, static_cast<int>(sortedBooks.size()), [this]() { requestUpdate(); });
buttonNavigator.onPreviousList(selectedIndex, static_cast<int>(sortedBooks.size()), [this]() { requestUpdate(); });
if (mappedInput.wasPressed(MappedInputManager::Button::Confirm)) {
const BookReadingStats* book = sortedBooks[selectedIndex];
startActivityForResult(
std::make_unique<ReadingStatsBookDetailActivity>(renderer, mappedInput, book->docId),
startActivityForResult(std::make_unique<ReadingStatsBookDetailActivity>(renderer, mappedInput, book->docId),
// After detail closes the underlying store hasn't changed (it's
// read-only), so just redraw — selectedIndex is preserved.
[this](const ActivityResult&) { requestUpdate(); });
@@ -105,8 +102,7 @@ void ReadingStatsBookListActivity::render(RenderLock&&) {
// theme as "no subtitle" and the row collapses to a single line.
return sortedBooks[index]->author;
},
nullptr,
[this](int index) { return formatDuration(sortedBooks[index]->totalSeconds); }, true);
nullptr, [this](int index) { return formatDuration(sortedBooks[index]->totalSeconds); }, true);
}
const auto labels =