From a1aa0d417edb29903a10f2a69221d358c64390ec Mon Sep 17 00:00:00 2001 From: Thomas Kemmer Date: Wed, 6 Oct 2021 22:42:06 +0200 Subject: [PATCH] Fix #141: Disable native toasts on Android. --- src/app/services/i18n-toast.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/services/i18n-toast.service.ts b/src/app/services/i18n-toast.service.ts index dfd4aa4d..ab157d8d 100644 --- a/src/app/services/i18n-toast.service.ts +++ b/src/app/services/i18n-toast.service.ts @@ -44,8 +44,8 @@ export class I18nToastService { private toast: ToastProvider; - constructor(platform: Platform, controller: ToastController, private translate: TranslateService) { - this.toast = platform.is('cordova') ? new NativeToastProvider(platform) : new IonicToastProvider(controller); + constructor(platform: Platform, controller: ToastController, private translate: TranslateService) { + this.toast = platform.is('cordova') && !platform.is('android') ? new NativeToastProvider(platform) : new IonicToastProvider(controller); } showShortTop(key: string, params?: Object) { @@ -59,7 +59,7 @@ export class I18nToastService { showShortBottom(key: string, params?: Object) { return this.show('bottom', SHORT_DURATION, key, params); } - + showLongTop(key: string, params?: Object) { return this.show('top', LONG_DURATION, key, params); }