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 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 4.5 committed 2026-02-01 14:23:37 +01:00
1 parent 8aac765694
commit 88758609d5
1 file changed
+1 -8
@@ -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 */