aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-settings.component.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
index 5f2db9854..f73f3aa1e 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
@@ -23,6 +23,8 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked {
23 userVideoQuotaUsedDaily = 0 23 userVideoQuotaUsedDaily = 0
24 userVideoQuotaDailyPercentage = 15 24 userVideoQuotaDailyPercentage = 15
25 25
26 private lastScrollHash: string
27
26 constructor ( 28 constructor (
27 private viewportScroller: ViewportScroller, 29 private viewportScroller: ViewportScroller,
28 private userService: UserService, 30 private userService: UserService,
@@ -64,7 +66,11 @@ export class MyAccountSettingsComponent implements OnInit, AfterViewChecked {
64 } 66 }
65 67
66 ngAfterViewChecked () { 68 ngAfterViewChecked () {
67 if (window.location.hash) this.viewportScroller.scrollToAnchor(window.location.hash.replace('#', '')) 69 if (window.location.hash && window.location.hash !== this.lastScrollHash) {
70 this.viewportScroller.scrollToAnchor(window.location.hash.replace('#', ''))
71
72 this.lastScrollHash = window.location.hash
73 }
68 } 74 }
69 75
70 onAvatarChange (formData: FormData) { 76 onAvatarChange (formData: FormData) {