Revert commit 7eec859
("Do not remove stuff from lists")
When removing a download, Angular doesn't update the download list correctly when it receives new data unless we pull out the item that should be removed from the array manually first.
This commit is contained in:
parent
3811093c3a
commit
a4fb25802d
11
js/ctrls/main.js
Normal file → Executable file
11
js/ctrls/main.js
Normal file → Executable file
|
@ -95,6 +95,17 @@ function(
|
|||
d.followedFrom = null;
|
||||
}
|
||||
rpc.once(method, [d.gid], cb);
|
||||
|
||||
var lists = [scope.active, scope.waiting, scope.stopped], ind = -1, i;
|
||||
for (var i = 0; i < lists.length; ++i) {
|
||||
var list = lists[i];
|
||||
var idx = list.indexOf(d);
|
||||
if (idx < 0) {
|
||||
continue;
|
||||
}
|
||||
list.splice(idx, 1);
|
||||
return;
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user