MOBILE-3608 core: Handle content links

main
Pau Ferrer Ocaña 2020-12-10 14:09:03 +01:00
parent c12133eea3
commit b2ecdf5224
1 changed files with 5 additions and 2 deletions

View File

@ -22,6 +22,7 @@ import { CoreUrlUtils } from '@services/utils/url';
import { CoreUtils } from '@services/utils/utils'; import { CoreUtils } from '@services/utils/utils';
import { CoreTextUtils } from '@services/utils/text'; import { CoreTextUtils } from '@services/utils/text';
import { CoreConstants } from '@/core/constants'; import { CoreConstants } from '@/core/constants';
import { CoreContentLinksHelper } from '@features/contentlinks/services/contentlinks-helper';
/** /**
* Directive to open a link in external browser or in the app. * Directive to open a link in external browser or in the app.
@ -76,8 +77,10 @@ export class CoreLinkDirective implements OnInit {
if (CoreUtils.instance.isTrueOrOne(this.capture)) { if (CoreUtils.instance.isTrueOrOne(this.capture)) {
href = CoreTextUtils.instance.decodeURI(href); href = CoreTextUtils.instance.decodeURI(href);
// @todo: Handle link. const treated = CoreContentLinksHelper.instance.handleLink(href, undefined, true, true);
if (!treated) {
this.navigate(href, openIn); this.navigate(href, openIn);
}
} else { } else {
this.navigate(href, openIn); this.navigate(href, openIn);
} }