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