MOBILE-3947 blocks: Check blocks are enabled on blocks delegates
parent
a05aba6bef
commit
a6a31f8e79
|
@ -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);
|
||||||
|
|
|
@ -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.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue