Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fixes disabled torrent viewer torrent download #14134

Merged
merged 1 commit into from
May 21, 2018

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented May 15, 2018

Resolves #10767

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

  1. disable Torrent Viewer in preferences
  2. go to https://webtorrent.io/free-torrents/
  3. download Big Buck Bunny torrent file
  4. make sure that save dialog is opened

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@@ -202,6 +204,14 @@ const applyReducers = (state, action, immutableAction) => reducers.reduce(
return newState
}, appState)

const isWebTorrentEnabled = (state) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Place of this function is not perfect. Where would you put it, so that I can also add unit tests?

cc @bsclifton @petemill

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NejcZdovc how about app/common/state/extensionState.js?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about that file but was not sure. Ok let me put it there. Thx

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is a perfect place to put it- good call 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved

@NejcZdovc NejcZdovc requested review from petemill and bsclifton May 17, 2018 20:44
@bsclifton bsclifton modified the milestones: 0.24.x (Nightly Channel), 0.22.x Release 4 (Beta channel) May 18, 2018
@NejcZdovc NejcZdovc force-pushed the fix/#10767-torrent branch from 3d6763e to a735504 Compare May 21, 2018 14:53
@NejcZdovc NejcZdovc requested review from petemill and bsclifton May 21, 2018 15:05
@NejcZdovc NejcZdovc force-pushed the fix/#10767-torrent branch from a735504 to a4584cf Compare May 21, 2018 15:06
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes work great and code looks good 😄 Thanks for adding tests

@bsclifton bsclifton merged commit 9f02082 into brave:master May 21, 2018
bsclifton added a commit that referenced this pull request May 21, 2018
Fixes disabled torrent viewer torrent download
bsclifton added a commit that referenced this pull request May 21, 2018
Fixes disabled torrent viewer torrent download
@bsclifton
Copy link
Member

master 9f02082
0.23.x 4ab36a3
0.22.x e30b3c5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants