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:
parent
3f6fe28f35
commit
78f6e06dd8
@ -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>
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user