Refactor submenu creation logic
This commit is contained in:
1 parent
7533ed1a9c
commit
0c080f5600
8 files changed
+102
-30
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user