state: Use dispatch instead of direct call

This commit is contained in:
Feross Aboukhadijeh
2016-09-21 11:48:23 -07:00
parent 167da9dfd5
commit 1e05487acd
2 changed files with 2 additions and 4 deletions

View File

@@ -4,7 +4,6 @@ const electron = require('electron')
const {dispatch} = require('../lib/dispatcher')
const {TorrentKeyNotFoundError} = require('../lib/errors')
const State = require('../lib/state')
const sound = require('../lib/sound')
const TorrentSummary = require('../lib/torrent-summary')
@@ -159,7 +158,7 @@ module.exports = class TorrentListController {
// remove torrent from saved list
this.state.saved.torrents.splice(index, 1)
State.saveThrottled(this.state)
dispatch('saveStateThrottled')
}
// prevent user from going forward to a deleted torrent