MOBILE-2734 messages: Go to group conversations from index link handler

main
Albert Gasset 2018-12-13 12:14:04 +01:00
parent f4350e9b6a
commit fd47d4d5fb
1 changed files with 6 additions and 1 deletions

View File

@ -44,8 +44,13 @@ export class AddonMessagesIndexLinkHandler extends CoreContentLinksHandlerBase {
CoreContentLinksAction[] | Promise<CoreContentLinksAction[]> {
return [{
action: (siteId, navCtrl?): void => {
let pageName = 'AddonMessagesIndexPage';
if (this.messagesProvider.isGroupMessagingEnabled()) {
pageName = 'AddonMessagesGroupConversationsPage';
}
// Always use redirect to make it the new history root (to avoid "loops" in history).
this.linkHelper.goInSite(navCtrl, 'AddonMessagesIndexPage', undefined, siteId);
this.linkHelper.goInSite(navCtrl, pageName, undefined, siteId);
}
}];
}