Hide buttons when empty

This commit is contained in:
jpirnay
2026-03-23 21:37:49 +01:00
parent dc6074225c
commit 7ad9d6cf14
+3 -1
View File
@@ -119,7 +119,9 @@ void RecentBooksActivity::render(RenderLock&&) {
}
// Help text
const auto labels = mappedInput.mapLabels(tr(STR_HOME), tr(STR_OPEN), tr(STR_REMOVE), "");
const bool hasBooks = !recentBooks.empty();
const auto labels =
mappedInput.mapLabels(tr(STR_HOME), hasBooks ? tr(STR_OPEN) : "", hasBooks ? tr(STR_REMOVE) : "", "");
GUI.drawButtonHints(renderer, labels.btn1, labels.btn2, labels.btn3, labels.btn4);
renderer.displayBuffer();