MOBILE-2478 menu: Fix clicking calendar notifications

main
Dani Palou 2018-07-13 10:14:52 +02:00
parent 38e13c421d
commit 242da4e7a6
2 changed files with 5 additions and 0 deletions

View File

@ -62,6 +62,8 @@ export class AddonNotificationsProvider {
// Try to get the profile picture of the user.
this.userProvider.getProfile(notification.useridfrom, notification.courseid, true).then((user) => {
notification.profileimageurlfrom = user.profileimageurl;
}).catch(() => {
// Error getting user. This can happen if device is offline or the user is deleted.
});
}
});

View File

@ -91,8 +91,11 @@ export class CoreMainMenuPage implements OnDestroy {
for (let i = 0; i < this.tabs.length; i++) {
const tab = this.tabs[i];
if (tab.page == this.redirectPage) {
// Tab found. Set the params and unset the redirect page.
this.initialTab = i + 1;
tab.pageParams = Object.assign(tab.pageParams || {}, this.redirectParams);
this.redirectPage = null;
this.redirectParams = null;
break;
}
}