isAvailable
does not block the main thread anymore
This commit is contained in:
parent
15870f8a4e
commit
5493c652fd
@ -5,4 +5,5 @@
|
||||
- [__change__:] Renamed `isServiceAvailable` to `isAvailable`
|
||||
- [enhancement:] New print options like `name`, `landscape` or `duplex`
|
||||
- [enhancement:] Ability to print remote content via URI
|
||||
- [enhancement:] Callback support
|
||||
- [enhancement:] Callback support
|
||||
- [bugfix:] `isAvailable` does not block the main thread anymore.
|
@ -100,6 +100,7 @@ cordova plugin rm de.appplant.cordova.plugin.printer
|
||||
- [enhancement:] New print options like `name`, `landscape` or `duplex`
|
||||
- [enhancement:] Ability to print remote content via URI
|
||||
- [enhancement:] Callback support
|
||||
- [bugfix:] `isAvailable` does not block the main thread anymore.
|
||||
|
||||
#### Further informations
|
||||
- See [CHANGELOG.md][changelog] to get the full changelog for the plugin.
|
||||
|
@ -38,14 +38,16 @@
|
||||
*/
|
||||
- (void) isAvailable:(CDVInvokedUrlCommand*)command
|
||||
{
|
||||
CDVPluginResult* pluginResult;
|
||||
BOOL isAvailable = [self isPrintingAvailable];
|
||||
[self.commandDelegate runInBackground:^{
|
||||
CDVPluginResult* pluginResult;
|
||||
BOOL isAvailable = [self isPrintingAvailable];
|
||||
|
||||
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
|
||||
messageAsBool:isAvailable];
|
||||
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
|
||||
messageAsBool:isAvailable];
|
||||
|
||||
[self.commandDelegate sendPluginResult:pluginResult
|
||||
callbackId:command.callbackId];
|
||||
[self.commandDelegate sendPluginResult:pluginResult
|
||||
callbackId:command.callbackId];
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user