MOBILE-3636 core: Use start to watch splitview outlet on list manager

main
Pau Ferrer Ocaña 2021-02-22 15:58:20 +01:00
parent 5350f715a3
commit 5c56bf0635
6 changed files with 10 additions and 11 deletions

View File

@ -51,8 +51,7 @@ export class AddonBadgesUserBadgesPage implements AfterViewInit, OnDestroy {
async ngAfterViewInit(): Promise<void> {
await this.fetchInitialBadges();
this.badges.watchSplitViewOutlet(this.splitView);
this.badges.start();
this.badges.start(this.splitView);
}
/**

View File

@ -55,8 +55,12 @@ export abstract class CorePageItemsListManager<Item> {
/**
* Process page started operations.
*
* @param splitView Split view component.
*/
async start(): Promise<void> {
async start(splitView: CoreSplitViewComponent): Promise<void> {
this.watchSplitViewOutlet(splitView);
// Calculate current selected item.
const route = CoreNavigator.instance.getCurrentRoute({ pageComponent: this.pageComponent });
if (route !== null && route.firstChild) {

View File

@ -63,8 +63,7 @@ export class CoreGradesCoursePage implements AfterViewInit, OnDestroy {
async ngAfterViewInit(): Promise<void> {
await this.fetchInitialGrades();
this.grades.watchSplitViewOutlet(this.splitView);
this.grades.start();
this.grades.start(this.splitView);
}
/**

View File

@ -42,8 +42,7 @@ export class CoreGradesCoursesPage implements OnDestroy, AfterViewInit {
async ngAfterViewInit(): Promise<void> {
await this.fetchInitialCourses();
this.courses.watchSplitViewOutlet(this.splitView);
this.courses.start();
this.courses.start(this.splitView);
}
/**

View File

@ -33,8 +33,7 @@ export class CoreSettingsIndexPage implements AfterViewInit, OnDestroy {
*/
ngAfterViewInit(): void {
this.sections.setItems(CoreSettingsConstants.SECTIONS);
this.sections.watchSplitViewOutlet(this.splitView);
this.sections.start();
this.sections.start(this.splitView);
}
/**

View File

@ -62,8 +62,7 @@ export class CoreUserParticipantsPage implements OnInit, AfterViewInit, OnDestro
async ngAfterViewInit(): Promise<void> {
await this.fetchInitialParticipants();
this.participants.watchSplitViewOutlet(this.splitView);
this.participants.start();
this.participants.start(this.splitView);
}
/**