mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-03 02:14:16 +00:00
WebUI: Use correct operators in logical expressions
As suggested in https://github.com/qbittorrent/qBittorrent/pull/11825#discussion_r365557626
This commit is contained in:
parent
101ab3cf6c
commit
82047104fc
@ -1206,7 +1206,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|||||||
|
|
||||||
switch (filterName) {
|
switch (filterName) {
|
||||||
case 'downloading':
|
case 'downloading':
|
||||||
if (state != 'downloading' && !~state.indexOf('DL'))
|
if ((state != 'downloading') && (state.indexOf('DL') === -1))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'seeding':
|
case 'seeding':
|
||||||
@ -1214,15 +1214,15 @@ window.qBittorrent.DynamicTable = (function() {
|
|||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'completed':
|
case 'completed':
|
||||||
if (state != 'uploading' && !~state.indexOf('UP'))
|
if ((state != 'uploading') && (state.indexOf('UP') === -1))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'paused':
|
case 'paused':
|
||||||
if (!~state.indexOf('paused'))
|
if (state.indexOf('paused') === -1)
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'resumed':
|
case 'resumed':
|
||||||
if (~state.indexOf('paused'))
|
if (state.indexOf('paused') > -1)
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'inactive':
|
case 'inactive':
|
||||||
@ -1338,7 +1338,7 @@ window.qBittorrent.DynamicTable = (function() {
|
|||||||
this._this.selectRow(this.rowId);
|
this._this.selectRow(this.rowId);
|
||||||
const row = this._this.rows.get(this.rowId);
|
const row = this._this.rows.get(this.rowId);
|
||||||
const state = row['full_data'].state;
|
const state = row['full_data'].state;
|
||||||
if (~state.indexOf('paused'))
|
if (state.indexOf('paused') > -1)
|
||||||
startFN();
|
startFN();
|
||||||
else
|
else
|
||||||
pauseFN();
|
pauseFN();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user