bug fixed

This commit is contained in:
richard-loafle 2020-01-22 16:37:47 +09:00
parent 00dc2d511b
commit 41fb1b14a0
2 changed files with 21 additions and 16 deletions

View File

@ -256,6 +256,7 @@
class="myset" class="myset"
xPosition="after" xPosition="after"
yPosition="below" yPosition="below"
(closed)="onClosedProfileMenu($event)"
> >
<div class="setting"> <div class="setting">
<button mat-menu-item [matMenuTriggerFor]="presenseMenu"> <button mat-menu-item [matMenuTriggerFor]="presenseMenu">
@ -309,12 +310,14 @@
</button> </button>
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<div <div class="setting">
class="setting menu-item" <button
mat-menu-item
[matMenuTriggerFor]="informationMenu" [matMenuTriggerFor]="informationMenu"
(click)="onClickCheckForUpdates($event)" (menuOpened)="onMenuOpenedinformationMenu()"
> >
{{ 'information.checkForUpdates' | translate }} {{ 'information.checkForUpdates' | translate }}
</button>
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<div class="setting"> <div class="setting">
@ -432,7 +435,7 @@
</mat-radio-group> </mat-radio-group>
</mat-menu> </mat-menu>
<mat-menu #informationMenu="matMenu" (closed)="onClosedInformationMenu($event)"> <mat-menu #informationMenu="matMenu">
<div <div
class="version-info-container menu-item" class="version-info-container menu-item"
(click)="$event.stopPropagation()" (click)="$event.stopPropagation()"

View File

@ -400,6 +400,13 @@ export class TopBarComponent implements OnInit, OnDestroy {
this.nativeService.openDefaultBrowser(url); this.nativeService.openDefaultBrowser(url);
} }
onClosedProfileMenu() {
this.checkingUpdate = false;
this.checkingUpdateIsProcessing = false;
this.checkingUpdateAppVersion = undefined;
this.checkingUpdateIsExist = false;
}
onClickUpdate() { onClickUpdate() {
this.store.dispatch(UpdateStore.applyInstantUpdate()); this.store.dispatch(UpdateStore.applyInstantUpdate());
} }
@ -500,17 +507,12 @@ export class TopBarComponent implements OnInit, OnDestroy {
); );
} }
onClickCheckForUpdates(event: Event) { onMenuOpenedinformationMenu() {
event.stopPropagation(); if (this.checkingUpdate) {
return;
this.checkForUpdates();
} }
onClosedInformationMenu() { this.checkForUpdates();
this.checkingUpdate = false;
this.checkingUpdateIsProcessing = false;
this.checkingUpdateAppVersion = undefined;
this.checkingUpdateIsExist = false;
} }
checkForUpdates() { checkForUpdates() {