forked from CIT/Vmeda.Online
		
	Merge pull request #1920 from sammarshallou/MOBILE-2935
MOBILE-2935 Dashboard blocks: Fix code review problems
This commit is contained in:
		
						commit
						73f8b5a729
					
				| @ -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; | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -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): | ||||||
|  | |||||||
| @ -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> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user