MOBILE-3947 blocks: Check blocks are enabled on blocks delegates
parent
a05aba6bef
commit
a6a31f8e79
|
@ -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);
|
||||
|
|
|
@ -109,6 +109,13 @@ export class CoreBlockDelegateService extends CoreDelegate<CoreBlockHandler> {
|
|||
this.blocksUpdateObservable = new Subject<void>();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
async isEnabled(): Promise<boolean> {
|
||||
return !this.areBlocksDisabledInSite();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if blocks are disabled in a certain site.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue