Fixing api version checks and 2.2 workaround

This commit is contained in:
Mateus Meyer Jiacomelli 2023-02-08 19:01:02 -03:00
parent 5d71d1c3ed
commit b37470bf5c
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,6 @@ export class ChordViewComponent extends StageViewComponent {
} }
setNewSlides(slides: Slide[], currentSlide: number): void { setNewSlides(slides: Slide[], currentSlide: number): void {
super.setNewSlides(slides, currentSlide);
if (this.openlpService.assertApiVersionExact(2, 2)) { if (this.openlpService.assertApiVersionExact(2, 2)) {
// API Version 2.2 released on OpenLP 3.0.2 contains a bug on which 'selected' is not set correctly // API Version 2.2 released on OpenLP 3.0.2 contains a bug on which 'selected' is not set correctly
// on Transponse Service Item response. // on Transponse Service Item response.
@ -56,6 +55,7 @@ export class ChordViewComponent extends StageViewComponent {
slides[currentSlide].selected = true; slides[currentSlide].selected = true;
} }
} }
super.setNewSlides(slides, currentSlide);
// if this song is already known // if this song is already known
if (this.songTransposeMap.has(this.serviceItem.id)) { if (this.songTransposeMap.has(this.serviceItem.id)) {
const transposeLevel = this.songTransposeMap.get(this.serviceItem.id); const transposeLevel = this.songTransposeMap.get(this.serviceItem.id);

View File

@ -76,7 +76,7 @@ export class OpenLPService {
} }
assertApiVersionMinimum(version: number, revision: number) { assertApiVersionMinimum(version: number, revision: number) {
return version >= this.apiVersion && revision >= this.apiRevision; return this.apiVersion >= version && this.apiRevision >= revision;
} }
setAuthToken(token: string): void { setAuthToken(token: string): void {