MOBILE-2478 menu: Fix clicking calendar notifications
parent
38e13c421d
commit
242da4e7a6
|
@ -62,6 +62,8 @@ export class AddonNotificationsProvider {
|
||||||
// Try to get the profile picture of the user.
|
// Try to get the profile picture of the user.
|
||||||
this.userProvider.getProfile(notification.useridfrom, notification.courseid, true).then((user) => {
|
this.userProvider.getProfile(notification.useridfrom, notification.courseid, true).then((user) => {
|
||||||
notification.profileimageurlfrom = user.profileimageurl;
|
notification.profileimageurlfrom = user.profileimageurl;
|
||||||
|
}).catch(() => {
|
||||||
|
// Error getting user. This can happen if device is offline or the user is deleted.
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -91,8 +91,11 @@ export class CoreMainMenuPage implements OnDestroy {
|
||||||
for (let i = 0; i < this.tabs.length; i++) {
|
for (let i = 0; i < this.tabs.length; i++) {
|
||||||
const tab = this.tabs[i];
|
const tab = this.tabs[i];
|
||||||
if (tab.page == this.redirectPage) {
|
if (tab.page == this.redirectPage) {
|
||||||
|
// Tab found. Set the params and unset the redirect page.
|
||||||
this.initialTab = i + 1;
|
this.initialTab = i + 1;
|
||||||
tab.pageParams = Object.assign(tab.pageParams || {}, this.redirectParams);
|
tab.pageParams = Object.assign(tab.pageParams || {}, this.redirectParams);
|
||||||
|
this.redirectPage = null;
|
||||||
|
this.redirectParams = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue