ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix scroll issue when navigating from homepage
Chocobozzzd50c8a0b0a11
diff --git a/client/src/app/+home/home.component.ts b/client/src/app/+home/home.component.tsindex faf4110788..78a354a9af 100644--- a/client/src/app/+home/home.component.ts+++ b/client/src/app/+home/home.component.ts@@ -12,6 +12,7 @@ export class HomeComponent implements OnInit, OnDestroy, DisableForReuseHook {private customPageService = inject(CustomPageService)private sub: Subscriptionprivate peertubeRouter = inject(PeerTubeRouterService)+ private disabled = falsereadonly contentWrapper = viewChild<ElementRef<HTMLInputElement>>('contentWrapper')@@ -27,6 +28,8 @@ export class HomeComponent implements OnInit, OnDestroy, DisableForReuseHook {this.sub = fromEvent(window, 'scroll').pipe(debounceTime(250)).subscribe(() => {+ if (this.disabled) return+if (window.pageYOffset > 300) {this.peertubeRouter.silentNavigate([], {})this.sub.unsubscribe()@@ -41,8 +44,10 @@ export class HomeComponent implements OnInit, OnDestroy, DisableForReuseHook {}disableForReuse () {+ this.disabled = true}enabledForReuse () {+ this.disabled = true}}