Select last selected playlist by default.

For #957
This commit is contained in:
Kavin 2022-04-07 16:36:51 +01:00
parent 83cecb7603
commit 54e947fda7
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
1 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,7 @@ export default {
},
mounted() {
this.fetchPlaylists();
this.selectedPlaylist = this.getPreferenceString("selectedPlaylist" + this.hashCode(this.apiUrl()));
},
methods: {
handleClick(playlistId) {
@ -76,6 +77,7 @@ export default {
"Content-Type": "application/json",
},
}).then(json => {
this.setPreference("selectedPlaylist" + this.hashCode(this.apiUrl()), playlistId);
this.$emit("close");
if (json.error) alert(json.error);
});