From be6824d58c05ded076482e2adc43739399f254d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 23 Sep 2019 13:35:25 +0200 Subject: [PATCH] MOBILE-3167 blocks: Check block visibility --- src/core/block/components/block/block.ts | 6 ++++-- src/core/block/components/block/core-block.html | 2 +- .../components/course-blocks/core-block-course-blocks.html | 2 +- src/core/courses/pages/dashboard/dashboard.html | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/core/block/components/block/block.ts b/src/core/block/components/block/block.ts index 3632c972f..5a7546e52 100644 --- a/src/core/block/components/block/block.ts +++ b/src/core/block/components/block/block.ts @@ -57,8 +57,10 @@ export class CoreBlockComponent implements OnInit, OnDestroy, DoCheck { return; } - // Get the data to render the block. - this.initBlock(); + if (this.block.visible) { + // Get the data to render the block. + this.initBlock(); + } } /** diff --git a/src/core/block/components/block/core-block.html b/src/core/block/components/block/core-block.html index 591977ecd..1c1e3a215 100644 --- a/src/core/block/components/block/core-block.html +++ b/src/core/block/components/block/core-block.html @@ -1,4 +1,4 @@ -
+
diff --git a/src/core/block/components/course-blocks/core-block-course-blocks.html b/src/core/block/components/course-blocks/core-block-course-blocks.html index a34ada03c..47494de17 100644 --- a/src/core/block/components/course-blocks/core-block-course-blocks.html +++ b/src/core/block/components/course-blocks/core-block-course-blocks.html @@ -7,7 +7,7 @@ - + diff --git a/src/core/courses/pages/dashboard/dashboard.html b/src/core/courses/pages/dashboard/dashboard.html index d94fcdd0a..4f030b26f 100644 --- a/src/core/courses/pages/dashboard/dashboard.html +++ b/src/core/courses/pages/dashboard/dashboard.html @@ -42,7 +42,7 @@ - +