Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI: Use correct operators in logical expressions #11871

Merged
merged 1 commit into from Jan 14, 2020

Conversation

@NotTsunami
Copy link
Contributor

NotTsunami commented Jan 12, 2020

As suggested in #11825 (comment)

@@ -1206,23 +1206,23 @@ window.qBittorrent.DynamicTable = (function() {

switch (filterName) {
case 'downloading':
if (state != 'downloading' && !~state.indexOf('DL'))
if (state != 'downloading' && state.indexOf('DL') === -1)

This comment has been minimized.

Copy link
@NotTsunami

NotTsunami Jan 12, 2020

Author Contributor

I wonder if the left condition can be state !== 'downloading'

This comment has been minimized.

Copy link
@Chocobo1

Chocobo1 Jan 13, 2020

Member

If that doesn't break the UI, then you are encouraged to change it.

Copy link
Member

glassez left a comment

You should write WebUI in PR/commit titles.

@glassez

This comment has been minimized.

Copy link
Member

glassez commented Jan 12, 2020

Why not "WebUI: Use correct operators in logical expressions"?

@NotTsunami NotTsunami changed the title webui: Drop bitwise comparisons for logical comparisons WebUI: Use correct operators in logical expressions Jan 12, 2020
@NotTsunami NotTsunami force-pushed the NotTsunami:bitwise branch from ba97386 to 22d9b8d Jan 12, 2020
@NotTsunami NotTsunami requested a review from glassez Jan 12, 2020
@NotTsunami

This comment has been minimized.

Copy link
Contributor Author

NotTsunami commented Jan 12, 2020

Why not "WebUI: Use correct operators in logical expressions"?

Sounds good to me, done.

@Chocobo1 Chocobo1 added the WebUI label Jan 13, 2020
@Chocobo1 Chocobo1 added this to the 4.2.2 milestone Jan 13, 2020
@@ -1206,23 +1206,23 @@ window.qBittorrent.DynamicTable = (function() {

switch (filterName) {
case 'downloading':
if (state != 'downloading' && !~state.indexOf('DL'))
if (state != 'downloading' && state.indexOf('DL') === -1)

This comment has been minimized.

Copy link
@Chocobo1

Chocobo1 Jan 13, 2020

Member

If that doesn't break the UI, then you are encouraged to change it.

src/webui/www/private/scripts/dynamicTable.js Outdated Show resolved Hide resolved
src/webui/www/private/scripts/dynamicTable.js Outdated Show resolved Hide resolved
src/webui/www/private/scripts/dynamicTable.js Outdated Show resolved Hide resolved
src/webui/www/private/scripts/dynamicTable.js Outdated Show resolved Hide resolved
@Chocobo1 Chocobo1 merged commit e27c9bd into qbittorrent:master Jan 14, 2020
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Chocobo1

This comment has been minimized.

Copy link
Member

Chocobo1 commented Jan 14, 2020

@NotTsunami
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.