MOBILE-3507 notifications: Support open appurl in browser/iab
parent
06ce5e765c
commit
4c32239b54
|
@ -71,13 +71,24 @@ export class AddonNotificationsPushClickHandler implements CorePushNotifications
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to handle the appurl first.
|
// Try to handle the appurl.
|
||||||
if (notification.customdata && notification.customdata.appurl) {
|
if (notification.customdata && notification.customdata.appurl) {
|
||||||
|
switch (notification.customdata.appurlopenin) {
|
||||||
|
case 'inappbrowser':
|
||||||
|
this.utils.openInApp(notification.customdata.appurl);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
case 'browser':
|
||||||
|
return this.utils.openInBrowser(notification.customdata.appurl);
|
||||||
|
|
||||||
|
default:
|
||||||
if (this.linkHelper.handleLink(notification.customdata.appurl, undefined, undefined, true)) {
|
if (this.linkHelper.handleLink(notification.customdata.appurl, undefined, undefined, true)) {
|
||||||
// Link treated, stop.
|
// Link treated, stop.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// No appurl or cannot be handled by the app. Try to handle the contexturl now.
|
// No appurl or cannot be handled by the app. Try to handle the contexturl now.
|
||||||
if (notification.contexturl) {
|
if (notification.contexturl) {
|
||||||
|
|
Loading…
Reference in New Issue