commit
fff448f763
|
@ -114,7 +114,7 @@
|
||||||
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
|
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
|
||||||
<plugin name="cordova-clipboard" spec="^1.2.1" />
|
<plugin name="cordova-clipboard" spec="^1.2.1" />
|
||||||
<plugin name="nl.kingsquare.cordova.background-audio" spec="^1.0.1" />
|
<plugin name="nl.kingsquare.cordova.background-audio" spec="^1.0.1" />
|
||||||
<plugin name="phonegap-plugin-push" spec="1.11.1">
|
<plugin name="phonegap-plugin-push" spec="https://github.com/moodlemobile/phonegap-plugin-push.git#moodle">
|
||||||
<variable name="SENDER_ID" value="694767596569" />
|
<variable name="SENDER_ID" value="694767596569" />
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin name="cordova-plugin-customurlscheme" spec="^4.3.0">
|
<plugin name="cordova-plugin-customurlscheme" spec="^4.3.0">
|
||||||
|
|
|
@ -102,7 +102,7 @@ export class AddonMessagesModule {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
messagesProvider.invalidateDiscussionsCache().finally(() => {
|
messagesProvider.invalidateDiscussionsCache(notification.site).finally(() => {
|
||||||
linkHelper.goInSite(undefined, 'AddonMessagesIndexPage', undefined, notification.site);
|
linkHelper.goInSite(undefined, 'AddonMessagesIndexPage', undefined, notification.site);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -344,9 +344,11 @@ export class AddonPushNotificationsProvider {
|
||||||
// Execute the callback in the Angular zone, so change detection doesn't stop working.
|
// Execute the callback in the Angular zone, so change detection doesn't stop working.
|
||||||
this.zone.run(() => {
|
this.zone.run(() => {
|
||||||
this.pushID = data.registrationId;
|
this.pushID = data.registrationId;
|
||||||
this.registerDeviceOnMoodle().catch((error) => {
|
if (this.sitesProvider.isLoggedIn()) {
|
||||||
this.logger.warn('Can\'t register device', error);
|
this.registerDeviceOnMoodle().catch((error) => {
|
||||||
});
|
this.logger.warn('Can\'t register device', error);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ export class AddonPushNotificationsModule {
|
||||||
|
|
||||||
// Listen for local notification clicks (generated by the app).
|
// Listen for local notification clicks (generated by the app).
|
||||||
localNotificationsProvider.registerClick(AddonPushNotificationsProvider.COMPONENT,
|
localNotificationsProvider.registerClick(AddonPushNotificationsProvider.COMPONENT,
|
||||||
pushNotificationsProvider.notificationClicked);
|
pushNotificationsProvider.notificationClicked.bind(pushNotificationsProvider));
|
||||||
|
|
||||||
// Allow migrating the table from the old app to the new schema.
|
// Allow migrating the table from the old app to the new schema.
|
||||||
updateManager.registerAppTableMigration({
|
updateManager.registerAppTableMigration({
|
||||||
|
|
Loading…
Reference in New Issue