diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..b78d215 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# hyperamp Change Log +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## 0.5.3 - 2017-11-09 +* Added this here changelog +* Fix some state transfer bugs + +## 0.5.2 - 2017-11-10 +* Engage diff --git a/main/index.js b/main/index.js index 8cd822c..9caeaf6 100644 --- a/main/index.js +++ b/main/index.js @@ -255,6 +255,7 @@ app.on('window-all-closed', function allWindowsClosed () { app.on('activate', function activate () { if (player.win === null) { + al.recall() player.init() } globalShortcuts.reregister() diff --git a/renderer/elements/player/progress.js b/renderer/elements/player/progress.js index ca41d58..18b8b8f 100644 --- a/renderer/elements/player/progress.js +++ b/renderer/elements/player/progress.js @@ -110,9 +110,10 @@ class Progress extends Component { update (state, emit) { this.emit = emit + if (this.disabled !== truthy(state.player.currentIndex)) return true if (this.key !== get(state, 'player.currentTrack.key')) return true if (this.position !== state.player.currentTime) return true - if (this.disabled !== truthy(state.player.currentIndex)) return true + if (this.duration !== get(state, 'player.currentTrack.duration')) return true return false } } diff --git a/renderer/elements/playlist/index.js b/renderer/elements/playlist/index.js index 0a5e1de..dcd46e9 100644 --- a/renderer/elements/playlist/index.js +++ b/renderer/elements/playlist/index.js @@ -31,7 +31,7 @@ class Playlist extends Component { update (state, emit) { if (this.loading !== state.library.loading) return true - if (this.trackView.update(state, emit)) return true + this.trackView.render(state, emit) return false } } diff --git a/renderer/elements/playlist/track-view.js b/renderer/elements/playlist/track-view.js index a6030ca..be004be 100644 --- a/renderer/elements/playlist/track-view.js +++ b/renderer/elements/playlist/track-view.js @@ -262,7 +262,7 @@ class TrackView extends Component { if (this.isNewQuery !== state.library.isNewQuery) return true if (shouldColumnsUpdate(this.columns, state.library.columns)) return true // Mutate - if (this.currentIndex !== state.library.currentIndex) { + if (this.currentIndex !== state.library.currentIndex && !this.isNewQuery) { this.mutateCurrentIndex(state.library.currentIndex) } if (this.selectedIndex !== state.library.selectedIndex) { diff --git a/renderer/stores/library.js b/renderer/stores/library.js index 0018c51..f288981 100644 --- a/renderer/stores/library.js +++ b/renderer/stores/library.js @@ -16,8 +16,8 @@ function getInitialState () { currentIndex: mainState.al.index, search: mainState.al.searchTerm, selectedIndex: null, - isNewQuery: false, - loading: false, + isNewQuery: mainState.al.isNewQuery, + loading: mainState.loading, columns: Array.from(COLUMNS).reduce((obj, col) => { obj[col] = true return obj