From 2a083f7debfc318a03d41f054142de900a3e2c41 Mon Sep 17 00:00:00 2001 From: Chris Bianca Date: Sun, 3 Jun 2018 17:32:40 +0400 Subject: [PATCH] [android][notifications] Fix for #1167 - progress bar not working --- .../firebase/notifications/DisplayNotificationTask.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/io/invertase/firebase/notifications/DisplayNotificationTask.java b/android/src/main/java/io/invertase/firebase/notifications/DisplayNotificationTask.java index 9d1dc4d4..189e3cf6 100644 --- a/android/src/main/java/io/invertase/firebase/notifications/DisplayNotificationTask.java +++ b/android/src/main/java/io/invertase/firebase/notifications/DisplayNotificationTask.java @@ -200,7 +200,7 @@ public class DisplayNotificationTask extends AsyncTask { nb = nb.setPriority(priority.intValue()); } if (android.containsKey("progress")) { - Bundle progress = android.getBundle("lights"); + Bundle progress = android.getBundle("progress"); Double max = progress.getDouble("max"); Double progressI = progress.getDouble("progress"); nb = nb.setProgress(max.intValue(), progressI.intValue(), progress.getBoolean("indeterminate")); @@ -283,11 +283,11 @@ public class DisplayNotificationTask extends AsyncTask { if (reactContext != null) { Utils.sendEvent(reactContext, "notifications_notification_displayed", Arguments.fromBundle(notification)); } - + if (promise != null) { promise.resolve(null); } - + } catch (Exception e) { Log.e(TAG, "Failed to send notification", e); if (promise != null) {