summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlapinskijw <jlapinski.dev@gmail.com>2020-05-28 09:00:15 -0400
committerlapinskijw <jlapinski.dev@gmail.com>2020-05-28 09:00:15 -0400
commit15534aede7b4cbf69a9356ac674be8fda4a74bbc (patch)
treee8d90d5f6bd4d628202ab15645adec468345da5d
parent2b6a57b712ed18c28d869e105b3cc2e025e89535 (diff)
downloadsdl_ios-15534aede7b4cbf69a9356ac674be8fda4a74bbc.tar.gz
moved voice command empty check to SDLMenuManager
-rw-r--r--SmartDeviceLink/SDLMenuCell.m2
-rw-r--r--SmartDeviceLink/SDLMenuManager.m2
2 files changed, 2 insertions, 2 deletions
diff --git a/SmartDeviceLink/SDLMenuCell.m b/SmartDeviceLink/SDLMenuCell.m
index 392f81a97..67281cb21 100644
--- a/SmartDeviceLink/SDLMenuCell.m
+++ b/SmartDeviceLink/SDLMenuCell.m
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
_title = title;
_icon = icon;
- _voiceCommands = ([voiceCommands count] == 0) ? nil : voiceCommands;
+ _voiceCommands = voiceCommands;
_handler = handler;
_cellId = UINT32_MAX;
diff --git a/SmartDeviceLink/SDLMenuManager.m b/SmartDeviceLink/SDLMenuManager.m
index 28a70f754..880ffe025 100644
--- a/SmartDeviceLink/SDLMenuManager.m
+++ b/SmartDeviceLink/SDLMenuManager.m
@@ -642,7 +642,7 @@ UInt32 const MenuCellIdMin = 1;
params.position = @(position);
command.menuParams = params;
- command.vrCommands = cell.voiceCommands;
+ command.vrCommands = cell.voiceCommands.count == 0 ? nil : cell.voiceCommands;
command.cmdIcon = (cell.icon && shouldHaveArtwork) ? cell.icon.imageRPC : nil;
command.cmdID = @(cell.cellId);