diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2018-11-28 13:26:50 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2018-11-28 13:26:50 -0500 |
commit | 6c52a96f67fd68a3b0b153dfc4ab628a9984d839 (patch) | |
tree | b30a6c30831da495f7b339ec757e7097af938399 /SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m | |
parent | 0f8e75c3796b7915639db45a2670b681bee04226 (diff) | |
download | sdl_ios-6c52a96f67fd68a3b0b153dfc4ab628a9984d839.tar.gz |
Delete test choice set in choice set manager
Diffstat (limited to 'SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m')
-rw-r--r-- | SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m b/SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m index 0c1be6f59..f42144e67 100644 --- a/SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m +++ b/SmartDeviceLink/SDLCheckChoiceVROptionalOperation.m @@ -11,6 +11,7 @@ #import "SDLChoice.h" #import "SDLCreateInteractionChoiceSet.h" #import "SDLConnectionManagerType.h" +#import "SDLDeleteInteractionChoiceSet.h" #import "SDLLogMacros.h" NS_ASSUME_NONNULL_BEGIN @@ -47,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN weakself.vrOptional = YES; weakself.internalError = nil; - [weakself finishOperation]; + [weakself sdl_deleteTestChoices]; return; } @@ -58,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN weakself.vrOptional = NO; weakself.internalError = nil; - [weakself finishOperation]; + [weakself sdl_deleteTestChoices]; return; } @@ -70,6 +71,15 @@ NS_ASSUME_NONNULL_BEGIN }]; } +- (void)sdl_deleteTestChoices { + SDLDeleteInteractionChoiceSet *deleteChoiceSet = [[SDLDeleteInteractionChoiceSet alloc] initWithId:0]; + + __weak typeof(self) weakself = self; + [self.connectionManager sendConnectionManagerRequest:deleteChoiceSet withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) { + [weakself finishOperation]; + }]; +} + + (SDLCreateInteractionChoiceSet *)sdl_testCellWithVR:(BOOL)hasVR { SDLChoice *choice = [[SDLChoice alloc] init]; choice.choiceID = @0; |