I implemented subscription for PushNotifications on Version 2.3.0. There it worked fine.
After upgrading to Version 2.4.1 I don't get the subscription-information when calling PushNotificationManager.subscribe(boolean userVisibleOnly, String applicationServerKey, Functions.Func1 callback).
So you added e. When I debug with Chrome developer tools I can see, that e is holding the subscription-information and object is undefined. But you still give object to the callback.
I think that the same problem will occur in the load and unsubscribe methods.
I implemented subscription for PushNotifications on Version 2.3.0. There it worked fine. After upgrading to Version 2.4.1 I don't get the subscription-information when calling PushNotificationManager.subscribe(boolean userVisibleOnly, String applicationServerKey, Functions.Func1 callback).
I noticed, that on this commit: https://github.com/GwtMaterialDesign/gwt-material/commit/f9745fa86c9d5b1b812ca4a0b6b376ff37521c0d?branch=f9745fa86c9d5b1b812ca4a0b6b376ff37521c0d&diff=unified you changed the following line from:
getPushManager().subscribe(options).then(object -> { ... }
togetPushManager().subscribe(options).then((e, object) -> { PushSubscription subscription = (PushSubscription) object; subscribed = subscription != null; callback.call(subscription); return true; });
So you added
e
. When I debug with Chrome developer tools I can see, thate
is holding the subscription-information andobject
is undefined. But you still giveobject
to the callback.I think that the same problem will occur in the
load
andunsubscribe
methods.