From 7c2323e2b2c1be33ebe49e964fb2a7448870e16b Mon Sep 17 00:00:00 2001 From: karthik Date: Sun, 21 Sep 2025 12:32:58 +0530 Subject: [PATCH] fix : after compelting of mjp,jkp,and tre it will return the raceno properly --- btc-UI/src/app/components/navbar/navbar.component.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/btc-UI/src/app/components/navbar/navbar.component.ts b/btc-UI/src/app/components/navbar/navbar.component.ts index 721dfe4..fd4e886 100755 --- a/btc-UI/src/app/components/navbar/navbar.component.ts +++ b/btc-UI/src/app/components/navbar/navbar.component.ts @@ -278,6 +278,17 @@ export class NavbarComponent implements OnInit, OnDestroy { this.currentPool = null; this.multiLegBaseRaceIdx = 0; this.currentLegRaceDisplay = ''; + + // Reset selectedRace to the first open race (1 if no stops, or the running/open one if stops exist) + this.selectedRace = this.getOpenRaceStartingFrom(1); + this.sharedStateService.updateSharedData({ + type: 'selectedRace', + value: this.selectedRace, + }); + const electronAPI = (window as any).electronAPI; + if (electronAPI) { + electronAPI.syncSelectedRace(this.selectedRace); + } this.updateEnabledHorseNumbers(); } if (data.type === 'selectedRace') {