remove torrents that are no longer in the update from the grid

This commit is contained in:
Damien Churchill 2009-04-28 08:39:04 +00:00
parent 78b5c06776
commit d4d7f054f3
2 changed files with 9 additions and 1 deletions

View File

@ -268,6 +268,14 @@ Copyright:
record.set('tracker', torrent.tracker_host);
}
}
var torrentIds = Ext.keys(torrents);
store.each(function(record) {
if (torrentIds.indexOf(record.id) == -1) {
// Torrent is no longer in the grid so we must remove it.
store.remove(record);
}
}, this);
},
// private

File diff suppressed because one or more lines are too long