diff options
Diffstat (limited to 'SmartDeviceLink/private/SDLMenuReplaceOperation.m')
-rw-r--r-- | SmartDeviceLink/private/SDLMenuReplaceOperation.m | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/SmartDeviceLink/private/SDLMenuReplaceOperation.m b/SmartDeviceLink/private/SDLMenuReplaceOperation.m index 8f656c8a5..93d92cc75 100644 --- a/SmartDeviceLink/private/SDLMenuReplaceOperation.m +++ b/SmartDeviceLink/private/SDLMenuReplaceOperation.m @@ -341,10 +341,12 @@ NS_ASSUME_NONNULL_BEGIN // Strip away fields that cannot be used to determine uniqueness visually including fields not supported by the HMI cell.voiceCommands = nil; - // Don't check SDLImageFieldNameSubMenuIcon because it was added in 7.0 when the feature was added in 5.0. Just assume that if CommandIcon is not available, the submenu icon is not either. - if (![windowCapability hasImageFieldOfName:SDLImageFieldNameCommandIcon]) { + if (![SDLMenuReplaceUtilities windowCapabilitySupportsPrimaryImage:windowCapability forCell:cell]) { cell.icon = nil; } + if (![SDLMenuReplaceUtilities windowCapabilitySupportsSecondaryImage:windowCapability forCell:cell]) { + cell.secondaryArtwork = nil; + } if (cell.subCells != nil) { if (![windowCapability hasTextFieldOfName:SDLTextFieldNameMenuSubMenuSecondaryText]) { @@ -353,9 +355,6 @@ NS_ASSUME_NONNULL_BEGIN if (![windowCapability hasTextFieldOfName:SDLTextFieldNameMenuSubMenuTertiaryText]) { cell.tertiaryText = nil; } - if (![windowCapability hasImageFieldOfName:SDLImageFieldNameMenuSubMenuSecondaryImage]) { - cell.secondaryArtwork = nil; - } cell.subCells = [self sdl_cellsWithRemovedPropertiesFromCells:cell.subCells basedOnWindowCapability:windowCapability]; } else { if (![windowCapability hasTextFieldOfName:SDLTextFieldNameMenuCommandSecondaryText]) { @@ -364,9 +363,6 @@ NS_ASSUME_NONNULL_BEGIN if (![windowCapability hasTextFieldOfName:SDLTextFieldNameMenuCommandTertiaryText]) { cell.tertiaryText = nil; } - if (![windowCapability hasImageFieldOfName:SDLImageFieldNameMenuCommandSecondaryImage]) { - cell.secondaryArtwork = nil; - } } } |