Reset recent songs between sessions (fixes #249)

This commit is contained in:
An Phan 2016-03-06 15:51:50 +08:00
parent 913f21c9e5
commit caff687bdd
2 changed files with 10 additions and 0 deletions

View file

@ -35,6 +35,7 @@
import sharedStore from './stores/shared';
import queueStore from './stores/queue';
import songStore from './stores/song';
import userStore from './stores/user';
import preferenceStore from './stores/preference';
import playback from './services/playback';
@ -263,6 +264,7 @@
this.authenticated = false;
playback.stop();
queueStore.clear();
songStore.teardown();
this.loadMainView('queue');
this.$broadcast('koel:teardown');
});

View file

@ -388,4 +388,12 @@ export default {
return songs;
},
/**
* Called when the application is tore down.
* Reset stuff.
*/
teardown() {
this.state.recent = [];
},
};