MOBILE-2935 Dashboard blocks: Fix code review problems

main
sam marshall 2019-05-16 17:08:12 +01:00
parent 6dd8786da6
commit 2829e4ee31
3 changed files with 5 additions and 5 deletions

View File

@ -69,13 +69,13 @@ export class CoreBlockComponent implements OnInit, OnDestroy {
// Block not supported, don't render it. But, site plugins might not have finished loading. // Block not supported, don't render it. But, site plugins might not have finished loading.
// Subscribe to the observable in block delegate that will tell us if blocks are updated. // Subscribe to the observable in block delegate that will tell us if blocks are updated.
// We can retry init later if that happens. // We can retry init later if that happens.
this.blockSubscription = this.blockDelegate.blocksUpdateObservable.subscribe({ this.blockSubscription = this.blockDelegate.blocksUpdateObservable.subscribe(
next: (): void => { (): void => {
this.blockSubscription.unsubscribe(); this.blockSubscription.unsubscribe();
delete this.blockSubscription; delete this.blockSubscription;
this.initBlock(); this.initBlock();
} }
}); );
return; return;
} }

View File

@ -33,7 +33,7 @@ export class CoreSitePluginsBlockHandler extends CoreSitePluginsBaseHandler impl
* @param {Injector} injector Injector * @param {Injector} injector Injector
* @param {any} block Block data * @param {any} block Block data
* @param {string} contextLevel Context level (not used) * @param {string} contextLevel Context level (not used)
* @param {number} instanceId Instance if (not used) * @param {number} instanceId Instance id (not used)
* @return {CoreBlockHandlerData|Promise<CoreBlockHandlerData>} Data or promise resolved with the data * @return {CoreBlockHandlerData|Promise<CoreBlockHandlerData>} Data or promise resolved with the data
*/ */
getDisplayData(injector: Injector, block: any, contextLevel: string, instanceId: number): getDisplayData(injector: Injector, block: any, contextLevel: string, instanceId: number):

View File

@ -1 +1 @@
<core-site-plugins-plugin-content *ngIf="component && method" [component]="component" [method]="method" [args]="args" [initResult]="initResult" [data]="data"></core-site-plugins-plugin-content> <core-site-plugins-plugin-content *ngIf="component && method" [component]="component" [method]="method" [args]="args" [initResult]="initResult"></core-site-plugins-plugin-content>