mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
Use new AuotPushFeature.getSubscription API
This commit is contained in:
parent
f640224859
commit
ce15763cc4
@ -59,15 +59,9 @@ internal class WebPushEngineDelegate(
|
||||
override fun onGetSubscription(scope: String, onSubscription: (WebPushSubscription?) -> Unit) {
|
||||
// We don't have the appServerKey unless an app is creating a new subscription so we
|
||||
// allow the key to be null since it won't be overridden from a previous subscription.
|
||||
pushFeature.subscribe(
|
||||
scope = scope,
|
||||
onSubscribeError = {
|
||||
logger.error("Error on push onGetSubscription.")
|
||||
onSubscription(null)
|
||||
},
|
||||
onSubscribe = { subscription ->
|
||||
onSubscription(subscription.toEnginePushSubscription())
|
||||
})
|
||||
pushFeature.getSubscription(scope) {
|
||||
onSubscription(it?.toEnginePushSubscription())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSubscribe(
|
||||
|
Loading…
Reference in New Issue
Block a user