From 387a67c86fdeb6802ddcbc98dd2e9ed69ebdd780 Mon Sep 17 00:00:00 2001 From: EddyVerbruggen Date: Sat, 18 May 2019 16:11:18 +0200 Subject: [PATCH] - Fixes the 'cancel' feature: it wasn't working for all implementations of the {N} view hierarchy (and modals). - Also fixes toasts on iPad modals; they should be positioned at the bottom of the screen, not at the bottom of the modal. --- .gitignore | 2 +- demo/app/main-page.ts | 8 ++++++++ demo/app/main-page.xml | 3 +++ src/toasty.ios.ts | 36 +++++++++++++++++++++--------------- 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 3b0a0c6..2add9d5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ demo/platforms demo/node_modules node_modules .vscode -.ideas +.idea .DS_Store diff --git a/demo/app/main-page.ts b/demo/app/main-page.ts index ce6fbc5..6058324 100644 --- a/demo/app/main-page.ts +++ b/demo/app/main-page.ts @@ -24,3 +24,11 @@ export function positionToast() { toast.duration = ToastDuration.SHORT; toast.show(); } + +export function cancelToast() { + const toast = new Toasty('Canceling after 1 sec'); + toast.show(); + setTimeout(() => { + toast.cancel(); + }, 1000); +} diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml index 080983d..05c3eb8 100644 --- a/demo/app/main-page.xml +++ b/demo/app/main-page.xml @@ -12,6 +12,9 @@