diff --git a/src/addons/badges/pages/user-badges/user-badges.ts b/src/addons/badges/pages/user-badges/user-badges.ts index 7144fec28..5114df908 100644 --- a/src/addons/badges/pages/user-badges/user-badges.ts +++ b/src/addons/badges/pages/user-badges/user-badges.ts @@ -51,8 +51,7 @@ export class AddonBadgesUserBadgesPage implements AfterViewInit, OnDestroy { async ngAfterViewInit(): Promise { await this.fetchInitialBadges(); - this.badges.watchSplitViewOutlet(this.splitView); - this.badges.start(); + this.badges.start(this.splitView); } /** diff --git a/src/core/classes/page-items-list-manager.ts b/src/core/classes/page-items-list-manager.ts index 1c226eaa6..0810ede23 100644 --- a/src/core/classes/page-items-list-manager.ts +++ b/src/core/classes/page-items-list-manager.ts @@ -55,8 +55,12 @@ export abstract class CorePageItemsListManager { /** * Process page started operations. + * + * @param splitView Split view component. */ - async start(): Promise { + async start(splitView: CoreSplitViewComponent): Promise { + this.watchSplitViewOutlet(splitView); + // Calculate current selected item. const route = CoreNavigator.instance.getCurrentRoute({ pageComponent: this.pageComponent }); if (route !== null && route.firstChild) { diff --git a/src/core/features/grades/pages/course/course.page.ts b/src/core/features/grades/pages/course/course.page.ts index b0cb64d33..df99882d6 100644 --- a/src/core/features/grades/pages/course/course.page.ts +++ b/src/core/features/grades/pages/course/course.page.ts @@ -63,8 +63,7 @@ export class CoreGradesCoursePage implements AfterViewInit, OnDestroy { async ngAfterViewInit(): Promise { await this.fetchInitialGrades(); - this.grades.watchSplitViewOutlet(this.splitView); - this.grades.start(); + this.grades.start(this.splitView); } /** diff --git a/src/core/features/grades/pages/courses/courses.ts b/src/core/features/grades/pages/courses/courses.ts index 013614f43..76827f588 100644 --- a/src/core/features/grades/pages/courses/courses.ts +++ b/src/core/features/grades/pages/courses/courses.ts @@ -42,8 +42,7 @@ export class CoreGradesCoursesPage implements OnDestroy, AfterViewInit { async ngAfterViewInit(): Promise { await this.fetchInitialCourses(); - this.courses.watchSplitViewOutlet(this.splitView); - this.courses.start(); + this.courses.start(this.splitView); } /** diff --git a/src/core/features/settings/pages/index/index.ts b/src/core/features/settings/pages/index/index.ts index d373ad9a2..00e452db5 100644 --- a/src/core/features/settings/pages/index/index.ts +++ b/src/core/features/settings/pages/index/index.ts @@ -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); } /** diff --git a/src/core/features/user/pages/participants/participants.ts b/src/core/features/user/pages/participants/participants.ts index 7ec5932b1..ee568a417 100644 --- a/src/core/features/user/pages/participants/participants.ts +++ b/src/core/features/user/pages/participants/participants.ts @@ -62,8 +62,7 @@ export class CoreUserParticipantsPage implements OnInit, AfterViewInit, OnDestro async ngAfterViewInit(): Promise { await this.fetchInitialParticipants(); - this.participants.watchSplitViewOutlet(this.splitView); - this.participants.start(); + this.participants.start(this.splitView); } /**