summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Elias <francois.elias@livio.io>2021-03-05 15:58:44 -0500
committerFrank Elias <francois.elias@livio.io>2021-03-05 15:58:44 -0500
commitf545a9d77a789fabb7e36f2d8c1482bb02770b24 (patch)
tree4d939684d0ece78cdb80a8ddefa828dac48dbdcc
parent142b92072f47eeebc0686a44c5cafacb8706b02e (diff)
downloadsdl_ios-f545a9d77a789fabb7e36f2d8c1482bb02770b24.tar.gz
Comments review
-rw-r--r--SmartDeviceLink/private/SDLMenuManager.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/SmartDeviceLink/private/SDLMenuManager.m b/SmartDeviceLink/private/SDLMenuManager.m
index 86665e2b5..7be5f8a17 100644
--- a/SmartDeviceLink/private/SDLMenuManager.m
+++ b/SmartDeviceLink/private/SDLMenuManager.m
@@ -724,8 +724,8 @@ UInt32 const MenuCellIdMin = 1;
params.menuName = cell.uniqueTitle;
params.parentID = cell.parentCellId != UINT32_MAX ? @(cell.parentCellId) : nil;
params.position = @(position);
- params.secondaryText = (cell.secondaryText.length == 0 || ![self.windowCapability hasTextFieldOfName:SDLTextFieldNameMenuCommandSecondaryText]) ? nil : cell.secondaryText;
- params.tertiaryText = (cell.tertiaryText.length == 0 || ![self.windowCapability hasTextFieldOfName:SDLTextFieldNameMenuCommandTertiaryText]) ? nil : cell.tertiaryText;
+ params.secondaryText = (cell.secondaryText.length > 0 && [self.windowCapability hasTextFieldOfName:SDLTextFieldNameMenuCommandSecondaryText]) ? cell.secondaryText : nil;
+ params.tertiaryText = (cell.tertiaryText.length > 0 && [self.windowCapability hasTextFieldOfName:SDLTextFieldNameMenuCommandTertiaryText]) ? cell.tertiaryText : nil;
command.menuParams = params;
command.vrCommands = (cell.voiceCommands.count == 0) ? nil : cell.voiceCommands;
@@ -747,8 +747,8 @@ UInt32 const MenuCellIdMin = 1;
submenuLayout = self.menuConfiguration.defaultSubmenuLayout;
}
- NSString *secondaryText = (cell.secondaryText.length == 0 || ![self.windowCapability hasTextFieldOfName:SDLTextFieldNameMenuSubMenuSecondaryText]) ? nil : cell.secondaryText;
- NSString *tertiaryText = (cell.tertiaryText.length == 0 || ![self.windowCapability hasTextFieldOfName:SDLTextFieldNameMenuSubMenuTertiaryText]) ? nil : cell.tertiaryText;
+ NSString *secondaryText = (cell.secondaryText.length > 0 && [self.windowCapability hasTextFieldOfName:SDLTextFieldNameMenuSubMenuSecondaryText]) ? cell.secondaryText : nil;
+ NSString *tertiaryText = (cell.tertiaryText.length > 0 && [self.windowCapability hasTextFieldOfName:SDLTextFieldNameMenuSubMenuTertiaryText]) ? cell.tertiaryText : nil;
return [[SDLAddSubMenu alloc] initWithMenuID:cell.cellId menuName:cell.uniqueTitle position:@(position) menuIcon:icon menuLayout:submenuLayout parentID:nil secondaryText:secondaryText tertiaryText:tertiaryText secondaryImage:secondaryImage];
}