MOBILE-3947 blocks: Check blocks are enabled on blocks delegates

main
Pau Ferrer Ocaña 2024-03-06 12:30:04 +01:00
parent a05aba6bef
commit a6a31f8e79
2 changed files with 8 additions and 3 deletions

View File

@ -31,9 +31,7 @@ export class CoreSortedDelegate<
protected sortedHandlers: DisplayType[] = []; protected sortedHandlers: DisplayType[] = [];
/** /**
* Constructor of the Delegate. * @inheritdoc
*
* @param delegateName Delegate name used for logging purposes.
*/ */
constructor(delegateName: string) { constructor(delegateName: string) {
super(delegateName, true); super(delegateName, true);

View File

@ -109,6 +109,13 @@ export class CoreBlockDelegateService extends CoreDelegate<CoreBlockHandler> {
this.blocksUpdateObservable = new Subject<void>(); this.blocksUpdateObservable = new Subject<void>();
} }
/**
* @inheritdoc
*/
async isEnabled(): Promise<boolean> {
return !this.areBlocksDisabledInSite();
}
/** /**
* Check if blocks are disabled in a certain site. * Check if blocks are disabled in a certain site.
* *