diff --git a/btc-UI/src/app/components/navbar/navbar.component.ts b/btc-UI/src/app/components/navbar/navbar.component.ts index 0cb1382..721dfe4 100755 --- a/btc-UI/src/app/components/navbar/navbar.component.ts +++ b/btc-UI/src/app/components/navbar/navbar.component.ts @@ -249,6 +249,10 @@ export class NavbarComponent implements OnInit, OnDestroy { this.sharedStateService.sharedData$.subscribe((data) => { if (data.type === 'currentLegRace') { this.selectedRace = data.value; + const electronAPI = (window as any).electronAPI; + if (electronAPI) { + electronAPI.syncSelectedRace(this.selectedRace); + } if (this.currentPool) { const leg = this.getLegIndexForRace(this.currentPool, data.value); this.currentLegRaceDisplay = `Leg ${leg + 1} (Race ${data.value}) for ${this.currentPool}`; @@ -263,6 +267,10 @@ export class NavbarComponent implements OnInit, OnDestroy { this.currentPool = label; this.multiLegBaseRaceIdx = baseRaceIdx; this.selectedRace = this.getValidRaceForLeg(label, 0); + const electronAPI = (window as any).electronAPI; + if (electronAPI) { + electronAPI.syncSelectedRace(this.selectedRace); + } this.currentLegRaceDisplay = `Starting at Race ${baseRaceIdx} for ${label}`; this.updateEnabledHorseNumbers(); } @@ -277,6 +285,10 @@ export class NavbarComponent implements OnInit, OnDestroy { this.multiLegBaseRaceIdx = 0; this.currentLegRaceDisplay = ''; this.selectedRace = data.value; + const electronAPI = (window as any).electronAPI; + if (electronAPI) { + electronAPI.syncSelectedRace(this.selectedRace); + } this.updateEnabledHorseNumbers(); } if (data.type === 'selectedVenue') {