aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-03-14 16:38:02 +0800
committercrupest <crupest@outlook.com>2019-03-14 16:38:02 +0800
commit780afcc14029d966f74fc8688aa040183ac23476 (patch)
treebc467184f38d9ea2962f860af889e002320e22e8
parentcdf413f103bfd9f81b75140b3da09230d08c788a (diff)
downloadtimeline-780afcc14029d966f74fc8688aa040183ac23476.tar.gz
timeline-780afcc14029d966f74fc8688aa040183ac23476.tar.bz2
timeline-780afcc14029d966f74fc8688aa040183ac23476.zip
Only open user dialog when it is not opened!
-rw-r--r--Timeline/ClientApp/src/app/user/user.service.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/Timeline/ClientApp/src/app/user/user.service.ts b/Timeline/ClientApp/src/app/user/user.service.ts
index 076d0c21..e7d50dd2 100644
--- a/Timeline/ClientApp/src/app/user/user.service.ts
+++ b/Timeline/ClientApp/src/app/user/user.service.ts
@@ -22,7 +22,9 @@ export class UserService {
constructor(router: Router, private dialog: MatDialog, private internalService: InternalUserService) {
router.events.subscribe(event => {
if (event instanceof ActivationStart && event.snapshot.outlet === 'user') {
- setTimeout(() => this.openUserDialog(), 0);
+ if (!this.dialogRef) {
+ setTimeout(() => this.openUserDialog(), 0);
+ }
}
});
}