From 88758609d59892b9edff1825bee49d058f8e96f8 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sun, 1 Feb 2026 14:23:37 +0100 Subject: [PATCH] fix: remove double navigation in vod-details goBack method The goBack() method was both emitting backClicked and calling location.back(), causing double navigation when parent components also handled backClicked with their own location.back() call. Now goBack() only emits the event, consistent with stalker-series-view. Co-Authored-By: Claude Opus 4.5 --- .../src/app/xtream/vod-details/vod-details.component.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/apps/web/src/app/xtream/vod-details/vod-details.component.ts b/apps/web/src/app/xtream/vod-details/vod-details.component.ts index b00195deb..1a8f3d647 100644 --- a/apps/web/src/app/xtream/vod-details/vod-details.component.ts +++ b/apps/web/src/app/xtream/vod-details/vod-details.component.ts @@ -1,4 +1,3 @@ -import { Location } from '@angular/common'; import { Component, computed, @@ -82,7 +81,6 @@ export class VodDetailsComponent implements OnDestroy { // ============ Services ============ - private readonly location = inject(Location); private readonly downloadsService = inject(DownloadsService); private readonly stalkerStore = inject(StalkerStore); @@ -173,14 +171,9 @@ export class VodDetailsComponent implements OnDestroy { }); } - /** Handle back navigation */ + /** Handle back navigation - emit event for parent to handle */ goBack(): void { this.backClicked.emit(); - // For Stalker items, parent handles navigation by clearing selectedItem - // For Xtream items, use browser history navigation - if (!this.isStalkerItem()) { - this.location.back(); - } } /** Handle download request */