Prevent double mobile back buttons

Fixes an error where a close and a back button
could be shown in mobile mode
This commit is contained in:
Sean Engelhardt 2019-07-09 23:22:58 +02:00
parent 3f6fe28f35
commit 78f6e06dd8
2 changed files with 3 additions and 3 deletions

View File

@ -7,12 +7,12 @@
<mat-toolbar color="primary" [ngClass]="multiSelectMode ? 'multi-select' : ''" class="sticky-toolbar">
<div class="toolbar-left">
<!-- 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>
</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>
</button>

View File

@ -112,7 +112,7 @@ export class HeadBarComponent {
public saveEvent = new EventEmitter<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);
}
/**