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

Deselect done fix #316 #533

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

Update file.js for deselected fix

  • Loading branch information
DiegoRBaquero committed Dec 21, 2015
commit fd20dfa766c8fbd24831e7c9ad08e5f81e0e2b18
@@ -26,6 +26,7 @@ function File (torrent, file) {
this.offset = file.offset

this.done = false
this.deselected = false

var start = file.offset
var end = start + file.length - 1
@@ -45,6 +46,7 @@ function File (torrent, file) {
*/
File.prototype.select = function () {
if (this.length === 0) return
this.deselected = false
this._torrent.select(this._startPiece, this._endPiece, false)
}

@@ -54,6 +56,7 @@ File.prototype.select = function () {
*/
File.prototype.deselect = function () {
if (this.length === 0) return
this.deselected = true
this._torrent.deselect(this._startPiece, this._endPiece, false)
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.