Skip to content

Commit

Permalink
fix(top): remote top shown fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Mar 27, 2018
1 parent 4243565 commit 2f66398
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/top-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import RaisedButton from 'material-ui/RaisedButton';
import LinearProgress from 'material-ui/LinearProgress';

import {Tabs, Tab} from 'material-ui/Tabs';
import _ from 'lodash'

export default class TopPage extends Page {
constructor(props) {
Expand Down Expand Up @@ -56,6 +57,7 @@ export default class TopPage extends Page {
this.remoteTopTorrents = ({torrents, type}) => {
if(!torrents)
return
type = type ? type : 'main'
this.topTorrents[type] = _.orderBy(_.unionBy(this.topTorrents[type], torrents, 'hash'), ['seeders'], ['desc'])
this.forceUpdate();
}
Expand Down

0 comments on commit 2f66398

Please sign in to comment.