Refactor submenu creation logic

This commit is contained in:
jpirnay
2026-04-24 12:44:08 +02:00
parent 7533ed1a9c
commit 0c080f5600
8 changed files with 102 additions and 30 deletions
@@ -252,8 +252,12 @@ std::string EpubReaderMenuActivity::getItemValueString(int index) const {
return currentPageStarred ? std::string(tr(STR_STATE_ON)) : std::string(tr(STR_STATE_OFF));
}
// Plain ACTION items (select chapter, screenshot, etc.) show no value
if (item.type == SettingType::ACTION) return {};
// Plain ACTION items (select chapter, screenshot, etc.) show no value.
// Submenu placeholders should still show the standard submenu indicator.
if (item.type == SettingType::ACTION) {
if (item.action == SettingAction::Submenu) return MenuListActivity::getItemValueString(index);
return {};
}
// DynamicEnum items use the standard display
return MenuListActivity::getItemValueString(index);