Fix isAvailable to return empty list on iOS

This commit is contained in:
Sebastián Katzer 2016-07-24 13:49:23 +02:00
parent 5c6c646e6d
commit 217d63292f

View File

@ -42,10 +42,11 @@
{
[self.commandDelegate runInBackground:^{
CDVPluginResult* pluginResult;
BOOL isAvailable = [self isPrintingAvailable];
BOOL isAvailable = [self isPrintingAvailable];
NSArray *multipart = @[[NSNumber numberWithBool:isAvailable], @[]];
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
messageAsBool:isAvailable];
messageAsMultipart:multipart];
[self.commandDelegate sendPluginResult:pluginResult
callbackId:command.callbackId];
@ -139,7 +140,7 @@
printInfo.duplex = duplexMode;
printInfo.jobName = [settings objectForKey:@"name"];
controller.printInfo = printInfo;
controller.printInfo = printInfo;
controller.showsPageRange = ![[settings objectForKey:@"hidePageRange"] boolValue];
controller.showsNumberOfCopies = ![[settings objectForKey:@"hideNumberOfCopies"] boolValue];