Merge pull request #4835 from tsiegleauq/even-smarter-back-button
Prevent double mobile back buttons
This commit is contained in:
commit
6295240cfc
@ -7,12 +7,12 @@
|
|||||||
<mat-toolbar color="primary" [ngClass]="multiSelectMode ? 'multi-select' : ''" class="sticky-toolbar">
|
<mat-toolbar color="primary" [ngClass]="multiSelectMode ? 'multi-select' : ''" class="sticky-toolbar">
|
||||||
<div class="toolbar-left">
|
<div class="toolbar-left">
|
||||||
<!-- Nav menu -->
|
<!-- Nav menu -->
|
||||||
<button mat-icon-button *ngIf="vp.isMobile && !showBackButton" (click)="clickHamburgerMenu()">
|
<button mat-icon-button *ngIf="vp.isMobile && !showBackButton && !editMode" (click)="clickHamburgerMenu()">
|
||||||
<mat-icon>menu</mat-icon>
|
<mat-icon>menu</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Exit / Back button -->
|
<!-- Exit / Back button -->
|
||||||
<button mat-icon-button *ngIf="showBackButton" (click)="onBackButton()">
|
<button mat-icon-button *ngIf="showBackButton && !editMode" (click)="onBackButton()">
|
||||||
<mat-icon>arrow_back</mat-icon>
|
<mat-icon>arrow_back</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ export class HeadBarComponent {
|
|||||||
public saveEvent = new EventEmitter<boolean>();
|
public saveEvent = new EventEmitter<boolean>();
|
||||||
|
|
||||||
public get showBackButton(): boolean {
|
public get showBackButton(): boolean {
|
||||||
return !this.nav && !this.editMode && !this.multiSelectMode && this.routingState.isSafePrevUrl;
|
return !this.nav && !this.multiSelectMode && (this.routingState.isSafePrevUrl || !this.goBack);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user