Use dispatch('setTitle') and add dispatch('resetTitle')

This commit is contained in:
Feross Aboukhadijeh
2016-07-27 14:39:22 -07:00
parent 2590e0effc
commit c2f869b362
4 changed files with 7 additions and 5 deletions

View File

@@ -242,7 +242,7 @@ module.exports = class PlaybackController {
}
// otherwise, play the video
state.window.title = torrentSummary.files[state.playing.fileIndex].name
dispatch('setTitle', torrentSummary.files[state.playing.fileIndex].name)
this.update()
ipcRenderer.send('onPlayerOpen')
@@ -274,7 +274,7 @@ module.exports = class PlaybackController {
else console.error('Unknown state.playing.result', state.playing.result)
// Reset the window contents back to the home screen
state.window.title = this.config.APP_WINDOW_TITLE
dispatch('resetTitle')
state.playing = State.getDefaultPlayState()
state.server = null