Skip to content

Commit

Permalink
Update import for push subscription changed state and method declarat…
Browse files Browse the repository at this point in the history
…ions for notification click
  • Loading branch information
jennantilla committed Jul 21, 2023
1 parent 07b9803 commit d8099e1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.onesignal.notifications.INotificationReceivedEvent;
import com.onesignal.user.subscriptions.IPushSubscription;
import com.onesignal.user.subscriptions.PushSubscriptionState;
import com.onesignal.user.subscriptions.PushSubscriptionChangedState;

import org.json.JSONArray;
import org.json.JSONException;
Expand Down Expand Up @@ -67,7 +68,7 @@ public static WritableMap convertHashMapToWritableMap(HashMap<String, Object> ha
public static HashMap<String, Object> convertNotificationClickEventToMap(INotificationClickEvent event) throws JSONException {
HashMap<String, Object> clickResultHash = new HashMap<>();
HashMap<String, Object> hash = new HashMap<>();
HashMap<String, Object> notificationHash = convertNotificationEventToMap(event.getNotification());
HashMap<String, Object> notificationHash = convertNotificationToMap(event.getNotification());
INotificationClickResult clickResult = event.getResult();

clickResultHash.put("actionId", clickResult.getActionId());
Expand All @@ -79,7 +80,7 @@ public static HashMap<String, Object> convertNotificationClickEventToMap(INotifi
return hash;
}

private static HashMap<String, Object> convertNotificationToMap(INotification notification) throws JSONException {
public static HashMap<String, Object> convertNotificationToMap(INotification notification) throws JSONException {
HashMap<String, Object> notificationHash = new HashMap<>();
notificationHash.put("androidNotificationId", notification.getAndroidNotificationId());

Expand Down

0 comments on commit d8099e1

Please sign in to comment.