From 9cd8f94d7a897337d6127c5982c8ee3c0d11e511 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Wed, 29 Jul 2015 16:16:54 +0200 Subject: [PATCH] Check foreground/coldstart better in iOS, foreground/coldstart is `"0"` or `"1"`. Checking with == true or false, does work. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d3169a7..bf8d5bb2 100644 --- a/README.md +++ b/README.md @@ -433,7 +433,7 @@ function onNotification(e) { case 'message': // if this flag is set, this notification happened while we were in the foreground. // you might want to play a sound to get the user's attention, throw up a dialog, etc. - if ( e.foreground ) + if ( e.foreground == true ) { $("#app-status-ul").append('
  • --INLINE NOTIFICATION--' + '
  • '); @@ -446,7 +446,7 @@ function onNotification(e) { } else { // otherwise we were launched because the user touched a notification in the notification tray. - if ( e.coldstart ) + if ( e.coldstart == true ) { $("#app-status-ul").append('
  • --COLDSTART NOTIFICATION--' + '
  • '); }