Commit eda4e0f76181b9282d71256b42fa1a51cc614ab0

Authored by Igor Kulikov
1 parent 715eefa6

Fixed right layout and state name propagation in mobile mode, skip popover/dialog dashboard changes.

@@ -345,24 +345,26 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC @@ -345,24 +345,26 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
345 this.runChangeDetection(); 345 this.runChangeDetection();
346 } 346 }
347 )); 347 ));
348 - this.rxSubscriptions.push(this.route.queryParamMap.subscribe(  
349 - (paramMap) => {  
350 - if (paramMap.has('reload')) {  
351 - this.dashboardCtx.aliasController.updateAliases();  
352 - setTimeout(() => {  
353 - this.mobileService.handleDashboardStateName(this.dashboardCtx.stateController.getCurrentStateName());  
354 - this.mobileService.onDashboardLoaded(this.layouts.right.show, this.isRightLayoutOpened);  
355 - }); 348 + if (this.syncStateWithQueryParam) {
  349 + this.rxSubscriptions.push(this.route.queryParamMap.subscribe(
  350 + (paramMap) => {
  351 + if (paramMap.has('reload')) {
  352 + this.dashboardCtx.aliasController.updateAliases();
  353 + setTimeout(() => {
  354 + this.mobileService.handleDashboardStateName(this.dashboardCtx.stateController.getCurrentStateName());
  355 + this.mobileService.onDashboardLoaded(this.layouts.right.show, this.isRightLayoutOpened);
  356 + });
  357 + }
356 } 358 }
357 - }  
358 - )); 359 + ));
  360 + }
359 this.rxSubscriptions.push(this.breakpointObserver 361 this.rxSubscriptions.push(this.breakpointObserver
360 .observe(MediaBreakpoints['gt-sm']) 362 .observe(MediaBreakpoints['gt-sm'])
361 .subscribe((state: BreakpointState) => { 363 .subscribe((state: BreakpointState) => {
362 this.isMobile = !state.matches; 364 this.isMobile = !state.matches;
363 } 365 }
364 )); 366 ));
365 - if (this.isMobileApp) { 367 + if (this.isMobileApp && this.syncStateWithQueryParam) {
366 this.mobileService.registerToggleLayoutFunction(() => { 368 this.mobileService.registerToggleLayoutFunction(() => {
367 setTimeout(() => { 369 setTimeout(() => {
368 this.toggleLayouts(); 370 this.toggleLayouts();
@@ -464,7 +466,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC @@ -464,7 +466,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
464 } 466 }
465 467
466 ngOnDestroy(): void { 468 ngOnDestroy(): void {
467 - if (this.isMobileApp) { 469 + if (this.isMobileApp && this.syncStateWithQueryParam) {
468 this.mobileService.unregisterToggleLayoutFunction(); 470 this.mobileService.unregisterToggleLayoutFunction();
469 } 471 }
470 this.rxSubscriptions.forEach((subscription) => { 472 this.rxSubscriptions.forEach((subscription) => {