1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix sonarjs no-collapsible-if

This commit is contained in:
Bill Thornton 2022-10-03 14:22:02 -04:00
parent ccdbf0bfc3
commit 1f4e65822b
33 changed files with 330 additions and 473 deletions

View file

@ -106,10 +106,8 @@ function getIndicatorIcon(item) {
return 'fiber_manual_record';
}
if (item.SeriesTimerId) {
if (status !== 'Cancelled') {
return 'fiber_smart_record';
}
if (item.SeriesTimerId && status !== 'Cancelled') {
return 'fiber_smart_record';
}
return 'fiber_manual_record';

View file

@ -63,15 +63,10 @@ function onTimerChangedExternally(e, apiClient, data) {
const options = this.options;
let refresh = false;
if (data.Id) {
if (this.TimerId === data.Id) {
refresh = true;
}
}
if (data.ProgramId && options) {
if (options.programId === data.ProgramId) {
refresh = true;
}
if (data.Id && this.TimerId === data.Id) {
refresh = true;
} else if (data.ProgramId && options && options.programId === data.ProgramId) {
refresh = true;
}
if (refresh) {
@ -83,15 +78,11 @@ function onSeriesTimerChangedExternally(e, apiClient, data) {
const options = this.options;
let refresh = false;
if (data.Id) {
if (this.SeriesTimerId === data.Id) {
refresh = true;
}
if (data.Id && this.SeriesTimerId === data.Id) {
refresh = true;
}
if (data.ProgramId && options) {
if (options.programId === data.ProgramId) {
refresh = true;
}
if (data.ProgramId && options && options.programId === data.ProgramId) {
refresh = true;
}
if (refresh) {