Skip to content

Commit

Permalink
Fix #141: Disable native toasts on Android.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkem committed Oct 6, 2021
1 parent 2df3581 commit a1aa0d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/services/i18n-toast.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}
Expand Down

0 comments on commit a1aa0d4

Please sign in to comment.