mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
Reset recent songs between sessions (fixes #249)
This commit is contained in:
parent
913f21c9e5
commit
caff687bdd
2 changed files with 10 additions and 0 deletions
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -388,4 +388,12 @@ export default {
|
|||
|
||||
return songs;
|
||||
},
|
||||
|
||||
/**
|
||||
* Called when the application is tore down.
|
||||
* Reset stuff.
|
||||
*/
|
||||
teardown() {
|
||||
this.state.recent = [];
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue