From 00693c9a87926e6a06855da262c6b04388532b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 18 Oct 2022 12:12:29 +0200 Subject: [PATCH] MOBILE-4081 dashboard: Check if dashboard has enabled blocks --- src/core/features/courses/pages/dashboard/dashboard.html | 4 ++-- src/core/features/courses/pages/dashboard/dashboard.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/features/courses/pages/dashboard/dashboard.html b/src/core/features/courses/pages/dashboard/dashboard.html index ee62e3917..af35bb746 100644 --- a/src/core/features/courses/pages/dashboard/dashboard.html +++ b/src/core/features/courses/pages/dashboard/dashboard.html @@ -9,7 +9,7 @@ - + @@ -18,7 +18,7 @@ - + diff --git a/src/core/features/courses/pages/dashboard/dashboard.ts b/src/core/features/courses/pages/dashboard/dashboard.ts index 53234e327..45f58a4f1 100644 --- a/src/core/features/courses/pages/dashboard/dashboard.ts +++ b/src/core/features/courses/pages/dashboard/dashboard.ts @@ -36,6 +36,7 @@ export class CoreCoursesDashboardPage implements OnInit, OnDestroy { @ViewChildren(CoreBlockComponent) blocksComponents?: QueryList; + hasMainBlocks = false; hasSideBlocks = false; searchEnabled = false; downloadCourseEnabled = false; @@ -84,6 +85,7 @@ export class CoreCoursesDashboardPage implements OnInit, OnDestroy { this.blocks = blocks.mainBlocks; + this.hasMainBlocks = CoreBlockDelegate.hasSupportedBlock(blocks.mainBlocks); this.hasSideBlocks = CoreBlockDelegate.hasSupportedBlock(blocks.sideBlocks); } catch (error) { CoreDomUtils.showErrorModal(error);