refactor(email-composer): reorder code

This commit is contained in:
Daniel 2018-09-18 11:03:02 +02:00
parent 3699fa9b50
commit 49d27e816c

View File

@ -117,6 +117,30 @@ export interface EmailComposerOptions {
})
@Injectable()
export class EmailComposer extends IonicNativePlugin {
/**
* Checks if the app has a permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,
errorIndex: 2
})
hasPermission(): Promise<boolean> {
return;
}
/**
* Request permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,
errorIndex: 2
})
requestPermission(): Promise<boolean> {
return;
}
/**
* Verifies if sending emails is supported on the device.
*
@ -146,39 +170,6 @@ export class EmailComposer extends IonicNativePlugin {
});
}
/**
* Request permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,
errorIndex: 2
})
requestPermission(): Promise<boolean> {
return;
}
/**
* Checks if the app has a permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,
errorIndex: 2
})
hasPermission(): Promise<boolean> {
return;
}
/**
* Adds a new mail app alias.
*
* @param {string} alias The alias name
* @param {string} packageName The package name
*/
@Cordova()
addAlias(alias: string, packageName: string): void {}
/**
* Displays the email composer pre-filled with data.
*
@ -193,4 +184,13 @@ export class EmailComposer extends IonicNativePlugin {
open(options: EmailComposerOptions, scope?: any): Promise<any> {
return;
}
/**
* Adds a new mail app alias.
*
* @param {string} alias The alias name
* @param {string} packageName The package name
*/
@Cordova()
addAlias(alias: string, packageName: string): void {}
}