@@ -105,7 +105,7 @@ - (void)cancelKeyboard {
105105 if (error == nil && methodError == nil && [methodResult isKindOfClass: [NSDictionary class ]]) {
106106 if (methodResult[@" currentwindow" ] != [NSNull null ]) {
107107 if ([methodResult[@" currentwindow" ][@" id" ] longLongValue ] == WINDOW_VIRTUAL_KEYBOARD) {
108- [self GUIAction :@" Input.Back" params: @{} httpAPIcallback: nil ];
108+ [self simpleAction :@" Input.Back" params: @{}];
109109 }
110110 }
111111 }
@@ -187,7 +187,7 @@ - (BOOL)textField:(UITextField*)theTextField shouldChangeCharactersInRange:(NSRa
187187 else { // CHARACTER
188188 unichar x = [string characterAtIndex: 0 ];
189189 if (x == ' \n ' ) {
190- [self GUIAction :@" Input.Select" params: @{} httpAPIcallback: nil ];
190+ [self simpleAction :@" Input.Select" params: @{}];
191191 [backgroundTextField resignFirstResponder ];
192192 [xbmcVirtualKeyboard resignFirstResponder ];
193193 }
@@ -211,7 +211,7 @@ - (BOOL)textField:(UITextField*)theTextField shouldChangeCharactersInRange:(NSRa
211211 }
212212 }
213213 stringToSend = stringToSend ?: @" " ;
214- [self GUIAction :@" Input.SendText" params: @{@" text" : stringToSend, @" done" : @(inputFinished)} httpAPIcallback: nil ];
214+ [self simpleAction :@" Input.SendText" params: @{@" text" : stringToSend, @" done" : @(inputFinished)}];
215215 return YES ;
216216 }
217217}
@@ -224,12 +224,8 @@ - (void)textFieldDidEndEditing:(UITextField*)textField {
224224
225225#pragma mark - JSON commands
226226
227- - (void )GUIAction : (NSString *)action params : (NSDictionary *)params httpAPIcallback : (NSString *)callback {
228- [[Utilities getJsonRPC ] callMethod: action withParameters: params onCompletion: ^(NSString *methodName, NSInteger callId, id methodResult, DSJSONRPCError *methodError, NSError *error) {
229- if ((methodError != nil || error != nil ) && callback != nil ) { // Backward compatibility
230- [Utilities sendXbmcHttp: callback];
231- }
232- }];
227+ - (void )simpleAction : (NSString *)action params : (NSDictionary *)params {
228+ [[Utilities getJsonRPC ] callMethod: action withParameters: params];
233229}
234230
235231@end
0 commit comments