diff --git a/client/components/modals/EditModal.vue b/client/components/modals/EditModal.vue index b4e337f4..441d115a 100644 --- a/client/components/modals/EditModal.vue +++ b/client/components/modals/EditModal.vue @@ -25,18 +25,21 @@ export default { return { selectedTab: 'details', processing: false, - audiobook: null + audiobook: null, + fetchOnShow: false } }, watch: { show: { handler(newVal) { if (newVal) { - if (this.audiobook && this.audiobook.id === this.selectedAudiobookId) return + if (this.audiobook && this.audiobook.id === this.selectedAudiobookId) { + if (this.fetchOnShow) this.fetchFull() + return + } + this.fetchOnShow = false this.audiobook = null this.init() - } else { - this.$store.commit('audiobooks/removeListener', 'edit-modal') } } } @@ -75,7 +78,10 @@ export default { this.selectedTab = tab }, audiobookUpdated() { - this.fetchFull() + if (!this.show) this.fetchOnShow = true + else { + this.fetchFull() + } }, init() { this.$store.commit('audiobooks/addListener', { meth: this.audiobookUpdated, id: 'edit-modal', audiobookId: this.selectedAudiobookId }) diff --git a/client/components/modals/edit-tabs/Cover.vue b/client/components/modals/edit-tabs/Cover.vue index 38ba5d60..201c6f89 100644 --- a/client/components/modals/edit-tabs/Cover.vue +++ b/client/components/modals/edit-tabs/Cover.vue @@ -1,7 +1,16 @@