fix : 2nd screen race changes accordingly
This commit is contained in:
parent
41c6adc1d4
commit
f93bbe840f
@ -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') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user