MOBILE-3708 core: Remove todos related to split view navigation

main
Dani Palou 2021-02-23 14:29:59 +01:00
parent 9d3f4d5a29
commit e427ce6568
13 changed files with 4 additions and 24 deletions

View File

@ -434,8 +434,6 @@ export class AddonCalendarEventPage implements OnInit, OnDestroy {
* Open the page to edit the event.
*/
openEdit(): void {
// Decide which navCtrl to use. If this page is inside a split view, use the split view's master nav.
// @todo const navCtrl = this.svComponent ? this.svComponent.getMasterNav() : this.navCtrl;
CoreNavigator.navigateToSitePath('/calendar/edit', { params: { eventId: this.eventId } });
}

View File

@ -38,7 +38,6 @@ import {
AddonNotificationsPreferencesProcessorFormatted,
} from '@addons/notifications/services/notifications-helper';
import { CoreNavigator } from '@services/navigator';
// import { CoreSplitViewComponent } from '@components/split-view/split-view';
/**
* Page that displays notifications settings.
@ -61,7 +60,7 @@ export class AddonNotificationsSettingsPage implements OnInit, OnDestroy {
protected updateTimeout?: number;
constructor() { // @todo @Optional() protected svComponent: CoreSplitViewComponent,
constructor() {
this.notifPrefsEnabled = AddonNotifications.isNotificationPreferencesEnabled();
this.canChangeSound = CoreLocalNotifications.canDisableSound();
}
@ -196,8 +195,6 @@ export class AddonNotificationsSettingsPage implements OnInit, OnDestroy {
* @param handlerData
*/
openExtraPreferences(handlerData: AddonMessageOutputHandlerData): void {
// Decide which navCtrl to use. If this page is inside a split view, use the split view's master nav.
// @todo const navCtrl = this.svComponent ? this.svComponent.getMasterNav() : this.navCtrl;
CoreNavigator.navigateToSitePath(handlerData.page, { params: handlerData.pageParams });
}

View File

@ -75,8 +75,6 @@ export class CoreIframeComponent implements OnChanges {
// Show loading only with external URLs.
this.loading = !this.src || !CoreUrlUtils.isLocalFileUrl(this.src);
// @todo const navCtrl = this.svComponent ? this.svComponent.getMasterNav() : this.navCtrl;
// CoreIframeUtils.treatFrame(iframe, false, this.navCtrl);
CoreIframeUtils.treatFrame(iframe, false);
iframe.addEventListener('load', () => {

View File

@ -132,9 +132,9 @@ export class CoreInfiniteLoadingComponent implements OnChanges {
* Get the height of the element.
*
* @return Height.
* @todo erase is not needed: I'm depreacating it because if not needed or getBoundingClientRect has the same result, it should
* @todo erase if not needed: I'm depreacating it because if not needed or getBoundingClientRect has the same result, it should
* be erased, also with getElementHeight
* @deprecated
* @deprecated since 3.9.5
*/
getHeight(): number {
// return this.element.nativeElement.getBoundingClientRect().height;

View File

@ -124,7 +124,6 @@ export class CoreNavBarButtonsComponent implements OnInit, OnDestroy {
* If both button containers have a context menu, merge them into a single one.
*
* @param buttonsContainer The container where the buttons will be moved.
* @todo
*/
protected mergeContextMenus(buttonsContainer: HTMLElement): void {
// Check if both button containers have a context menu.

View File

@ -137,7 +137,6 @@ export class CoreUserAvatarComponent implements OnInit, OnChanges, OnDestroy {
event.preventDefault();
event.stopPropagation();
// @todo Decide which navCtrl to use. If this component is inside a split view, use the split view's master nav.
CoreNavigator.navigateToSitePath('user', {
params: {
userId: this.userId,

View File

@ -471,8 +471,6 @@ export class CoreFormatTextDirective implements OnChanges {
*/
protected async treatHTMLElements(div: HTMLElement, site?: CoreSite): Promise<void> {
const canTreatVimeo = site?.isVersionGreaterEqualThan(['3.3.4', '3.4']) || false;
// @todo this.svComponent ? this.svComponent.getMasterNav() : this.navCtrl;
// @todo: Pass navCtrl to all treateFrame calls?
const images = Array.from(div.querySelectorAll('img'));
const anchors = Array.from(div.querySelectorAll('a'));

View File

@ -56,8 +56,6 @@ export class CoreLinkDirective implements OnInit {
ngOnInit(): void {
this.inApp = typeof this.inApp == 'undefined' ? this.inApp : CoreUtils.isTrueOrOne(this.inApp);
// @todo: Handle split view?
this.element.addEventListener('click', async (event) => {
if (event.defaultPrevented) {
return; // Link already treated, stop.

View File

@ -49,7 +49,6 @@ export class CoreUserLinkDirective implements OnInit {
event.preventDefault();
event.stopPropagation();
// @todo If this directive is inside a split view, use the split view's master nav.
CoreNavigator.navigateToSitePath('user', {
params: CoreObject.withoutEmpty({
userId: this.userId,

View File

@ -43,7 +43,6 @@ export class CoreBlockOnlyTitleComponent extends CoreBlockBaseComponent implemen
* Go to the block page.
*/
gotoBlock(): void {
// @todo test that this is working properly.
CoreNavigator.navigateToSitePath(this.link!, { params: this.linkParams });
}

View File

@ -34,8 +34,6 @@ export class CoreCourseTagAreaComponent {
* @param courseId The course to open.
*/
openCourse(courseId: number): void {
// @todo If this component is inside a split view, use the master nav to open it.
// const navCtrl = this.splitviewCtrl ? this.splitviewCtrl.getMasterNav() : this.navCtrl;
CoreCourseHelper.getAndOpenCourse(courseId);
}

View File

@ -40,7 +40,6 @@ export class CoreTagListComponent {
fromContextId: tag.taginstancecontextid,
};
// @todo: Check split view to navigate on the outlet if any.
CoreNavigator.navigateToSitePath('/tag/index', { params, preferCurrentTab: false });
}

View File

@ -261,8 +261,7 @@ export class CoreUserProfilePage implements OnInit, OnDestroy {
* Open the page with the user details.
*/
openUserDetails(): void {
// @todo: Navigate out of split view if this page is in the right pane.
CoreNavigator.navigate('../about', {
CoreNavigator.navigateToSitePath('user/about', {
params: {
courseId: this.courseId,
userId: this.userId,
@ -277,7 +276,6 @@ export class CoreUserProfilePage implements OnInit, OnDestroy {
* @param handler Handler that was clicked.
*/
handlerClicked(event: Event, handler: CoreUserProfileHandlerData): void {
// @todo: Pass the right navCtrl if this page is in the right pane of split view.
handler.action(event, this.user!, this.courseId);
}