🐛 Fix the need to refresh to display the player when playing audio
This commit is contained in:
parent
146f5bf925
commit
14d6e2a315
@ -13,7 +13,6 @@ export default {
|
||||
add({ state, dispatch }, { audio, play }) {
|
||||
return new Promise((resolve) => {
|
||||
var index = state.openedAudios.findIndex((s) => s.id === audio.id);
|
||||
console.log(index);
|
||||
if (index >= 0) {
|
||||
state.openedAudios.splice(index, 1);
|
||||
state.player.list.remove(index + state.customAudios.length || 0);
|
||||
|
@ -18,7 +18,7 @@ export default {
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
...mapState("acrou/aplayer", ["player", "audios"]),
|
||||
...mapState("acrou/aplayer", ["player", "audios", "openedAudios"]),
|
||||
container() {
|
||||
return document.getElementById("aplayer");
|
||||
},
|
||||
@ -36,7 +36,7 @@ export default {
|
||||
};
|
||||
},
|
||||
show() {
|
||||
return this.audios && this.audios.length > 0;
|
||||
return (this.audios && this.audios.length > 0) || (this.openedAudios && this.openedAudios.length > 0);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
Loading…
Reference in New Issue
Block a user