diff --git a/src/addon/notifications/providers/notifications.ts b/src/addon/notifications/providers/notifications.ts index 6a6c5646b..34c3a1819 100644 --- a/src/addon/notifications/providers/notifications.ts +++ b/src/addon/notifications/providers/notifications.ts @@ -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. }); } }); diff --git a/src/core/mainmenu/pages/menu/menu.ts b/src/core/mainmenu/pages/menu/menu.ts index a2393ed8a..89567ab8d 100644 --- a/src/core/mainmenu/pages/menu/menu.ts +++ b/src/core/mainmenu/pages/menu/menu.ts @@ -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; } }