From 7d3a650ac4122b70637f1f8063d4034ae297541e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 15 Mar 2022 12:59:19 +0100 Subject: [PATCH] MOBILE-3814 course: Fix navigation buttons to not be fixed at bottom --- .../course/components/course-format/course-format.html | 2 +- .../features/course/components/course-format/course-format.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/features/course/components/course-format/course-format.html b/src/core/features/course/components/course-format/course-format.html index 2d8cd3391..323216634 100644 --- a/src/core/features/course/components/course-format/course-format.html +++ b/src/core/features/course/components/course-format/course-format.html @@ -24,7 +24,7 @@ -
+
diff --git a/src/core/features/course/components/course-format/course-format.ts b/src/core/features/course/components/course-format/course-format.ts index c43830b42..4e0be0612 100644 --- a/src/core/features/course/components/course-format/course-format.ts +++ b/src/core/features/course/components/course-format/course-format.ts @@ -92,6 +92,7 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { selectedSection?: CoreCourseSection; previousSection?: CoreCourseSection; nextSection?: CoreCourseSection; + hasPreviousOrNextSections = false; allSectionsId: number = CoreCourseProvider.ALL_SECTIONS_ID; stealthModulesSectionId: number = CoreCourseProvider.STEALTH_MODULES_SECTION_ID; loaded = false; @@ -488,6 +489,8 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { this.showMoreActivities(); } + this.hasPreviousOrNextSections = !!this.previousSection || !!this.nextSection; + // Scroll to module if needed. Give more priority to the input. const moduleIdToScroll = this.moduleId && previousValue === undefined ? this.moduleId : moduleId; if (moduleIdToScroll) {