Review changes
This commit is contained in:
@@ -211,6 +211,7 @@ void HomeActivity::onEnter() {
|
||||
}
|
||||
|
||||
// Trigger first update
|
||||
menuEntriesDirty = true;
|
||||
requestUpdate();
|
||||
}
|
||||
|
||||
@@ -308,7 +309,9 @@ void HomeActivity::render(RenderLock&&) {
|
||||
|
||||
GUI.drawHeader(renderer, Rect{contentRect.x, metrics.topPadding, contentRect.width, metrics.homeTopPadding}, nullptr);
|
||||
|
||||
rebuildMenuEntries();
|
||||
if (menuEntriesDirty) {
|
||||
rebuildMenuEntries();
|
||||
}
|
||||
|
||||
const int totalItems = static_cast<int>(recentBooks.size() + menuEntries.size());
|
||||
if (selectorIndex >= totalItems) {
|
||||
@@ -367,5 +370,8 @@ void HomeActivity::dispatchMenuAction(MenuAction action) {
|
||||
case MenuAction::Settings:
|
||||
activityManager.goToSettings();
|
||||
break;
|
||||
default:
|
||||
LOG_ERR("HOME", "Unexpected menu action: %d", static_cast<int>(action));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user