From 51b2c94cde5679fd9e67a6edb42211bee7e182b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 10 Jan 2019 08:59:40 +0100 Subject: [PATCH] MOBILE-2795 course: Load course image from course section without showing it --- src/core/course/components/format/core-course-format.html | 7 +++++-- src/core/course/components/format/format.scss | 1 + src/core/course/pages/section/section.ts | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/core/course/components/format/core-course-format.html b/src/core/course/components/format/core-course-format.html index a7c21a84c..3377c9150 100644 --- a/src/core/course/components/format/core-course-format.html +++ b/src/core/course/components/format/core-course-format.html @@ -23,8 +23,11 @@ - - + +
+ +
+
diff --git a/src/core/course/components/format/format.scss b/src/core/course/components/format/format.scss index 3639d394c..2533ecdba 100644 --- a/src/core/course/components/format/format.scss +++ b/src/core/course/components/format/format.scss @@ -34,6 +34,7 @@ ion-app.app-root core-course-format { } .core-course-thumb { + display: none; height: 150px; width: 100%; overflow: hidden; diff --git a/src/core/course/pages/section/section.ts b/src/core/course/pages/section/section.ts index a246213b6..4a8bcf145 100644 --- a/src/core/course/pages/section/section.ts +++ b/src/core/course/pages/section/section.ts @@ -265,6 +265,11 @@ export class CoreCourseSectionPage implements OnDestroy { }); })); + // Get the overview files. + if (this.course.overviewfiles) { + this.course.imageThumb = this.course.overviewfiles[0] && this.course.overviewfiles[0].fileurl; + } + // Load the course handlers. promises.push(this.courseOptionsDelegate.getHandlersToDisplay(this.injector, this.course, refresh, false) .then((handlers) => {