refactor(all): async/await

This commit is contained in:
Manu Mtz.-Almeida
2018-03-24 03:24:57 +01:00
parent ee1aaafd73
commit e20f76c3b1
10 changed files with 113 additions and 138 deletions

View File

@ -144,12 +144,12 @@ export class Loading implements OverlayInterface {
* Present the loading overlay after it has been created.
*/
@Method()
present(): Promise<void> {
return present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation, undefined).then(() => {
if (this.duration > 0) {
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
}
});
async present(): Promise<void> {
await present(this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation, undefined);
if (this.duration > 0) {
this.durationTimeout = setTimeout(() => this.dismiss(), this.duration + 10);
}
}
/**