Also rename internal "utis" functions

This commit is contained in:
Sebastián Katzer
2019-02-06 12:02:41 +01:00
parent a4439df194
commit ec4f721270
7 changed files with 9 additions and 66 deletions

View File

@@ -90,7 +90,7 @@ class PrintManager {
* List of all printable document types (utis).
*/
@NonNull
static JSONArray getPrintableUTIs()
static JSONArray getPrintableTypes()
{
JSONArray utis = new JSONArray();

View File

@@ -65,9 +65,9 @@ public class Printer extends CordovaPlugin {
{
check(args.optString(0), callback);
}
else if (action.equalsIgnoreCase("utis"))
else if (action.equalsIgnoreCase("types"))
{
utis(callback);
types(callback);
}
else if (action.equalsIgnoreCase("print"))
{
@@ -101,10 +101,10 @@ public class Printer extends CordovaPlugin {
*
* @param callback The plugin function to invoke with the result.
*/
private void utis (CallbackContext callback)
private void types (CallbackContext callback)
{
cordova.getThreadPool().execute(() -> {
JSONArray utis = PrintManager.getPrintableUTIs();
JSONArray utis = PrintManager.getPrintableTypes();
PluginResult res = new PluginResult(
Status.OK, utis);

View File

@@ -25,7 +25,7 @@
- (void) check:(CDVInvokedUrlCommand *)command;
- (void) utis:(CDVInvokedUrlCommand *)command;
- (void) types:(CDVInvokedUrlCommand *)command;
- (void) pick:(CDVInvokedUrlCommand *)command;

View File

@@ -52,7 +52,7 @@
/*
* List all printable document types (utis).
*/
- (void) utis:(CDVInvokedUrlCommand *)command
- (void) types:(CDVInvokedUrlCommand *)command
{
[self.commandDelegate runInBackground:^{
NSSet *utis = UIPrintInteractionController.printableUTIs;

View File

@@ -60,7 +60,7 @@ exports.check = function (success, fail, args) {
*
* @return [ Void ]
*/
exports.utis = function (success, fail, args) {
exports.types = function (success, fail, args) {
success([]);
};