diff options
author | crupest <crupest@outlook.com> | 2019-03-14 16:38:02 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-03-14 16:38:02 +0800 |
commit | 780afcc14029d966f74fc8688aa040183ac23476 (patch) | |
tree | bc467184f38d9ea2962f860af889e002320e22e8 | |
parent | cdf413f103bfd9f81b75140b3da09230d08c788a (diff) | |
download | timeline-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.ts | 4 |
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); + } } }); } |