Move torrent details to modal

This commit is contained in:
John Furrow
2016-05-07 22:14:29 -07:00
parent 2eac7fb035
commit 4eadd2180c
27 changed files with 559 additions and 529 deletions
+2 -3
View File
@@ -76,7 +76,7 @@ class TorrentStoreClass extends BaseStore {
}
getTorrentDetails(hash) {
return this.torrents[hash].details || {};
return this.torrents[hash].details || null;
}
getSelectedTorrents() {
@@ -151,13 +151,12 @@ class TorrentStoreClass extends BaseStore {
setTorrentDetails(hash, torrentDetails) {
this.torrents[hash].details = torrentDetails;
this.emit(EventTypes.CLIENT_TORRENT_DETAILS_CHANGE);
this.resolveRequest('fetch-torrent-details');
this.emit(EventTypes.CLIENT_TORRENT_DETAILS_CHANGE);
}
sortTorrents(torrents) {
let torrentsSort = TorrentFilterStore.getTorrentsSort();
this.torrents = torrents;
// Convert torrents hash to array and sort it.