From a6a31f8e796762043648ce63b5978ef258de8d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 6 Mar 2024 12:30:04 +0100 Subject: [PATCH] MOBILE-3947 blocks: Check blocks are enabled on blocks delegates --- src/core/classes/delegate-sorted.ts | 4 +--- src/core/features/block/services/block-delegate.ts | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/classes/delegate-sorted.ts b/src/core/classes/delegate-sorted.ts index 76910315f..987ed7aab 100644 --- a/src/core/classes/delegate-sorted.ts +++ b/src/core/classes/delegate-sorted.ts @@ -31,9 +31,7 @@ export class CoreSortedDelegate< protected sortedHandlers: DisplayType[] = []; /** - * Constructor of the Delegate. - * - * @param delegateName Delegate name used for logging purposes. + * @inheritdoc */ constructor(delegateName: string) { super(delegateName, true); diff --git a/src/core/features/block/services/block-delegate.ts b/src/core/features/block/services/block-delegate.ts index d492a3dd4..6f5e46f61 100644 --- a/src/core/features/block/services/block-delegate.ts +++ b/src/core/features/block/services/block-delegate.ts @@ -109,6 +109,13 @@ export class CoreBlockDelegateService extends CoreDelegate { this.blocksUpdateObservable = new Subject(); } + /** + * @inheritdoc + */ + async isEnabled(): Promise { + return !this.areBlocksDisabledInSite(); + } + /** * Check if blocks are disabled in a certain site. *