diff options
author | lapinskijw <jlapinski.dev@gmail.com> | 2020-05-28 09:00:15 -0400 |
---|---|---|
committer | lapinskijw <jlapinski.dev@gmail.com> | 2020-05-28 09:00:15 -0400 |
commit | 15534aede7b4cbf69a9356ac674be8fda4a74bbc (patch) | |
tree | e8d90d5f6bd4d628202ab15645adec468345da5d | |
parent | 2b6a57b712ed18c28d869e105b3cc2e025e89535 (diff) | |
download | sdl_ios-15534aede7b4cbf69a9356ac674be8fda4a74bbc.tar.gz |
moved voice command empty check to SDLMenuManager
-rw-r--r-- | SmartDeviceLink/SDLMenuCell.m | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLMenuManager.m | 2 |
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); |