From 221061ea308c896579254a7bf3828d1d96ce595e Mon Sep 17 00:00:00 2001 From: barry Date: Sun, 28 Aug 2022 08:22:51 -0400 Subject: [PATCH] added method to clear selected episodes --- client/components/modals/podcast/EpisodeFeed.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/components/modals/podcast/EpisodeFeed.vue b/client/components/modals/podcast/EpisodeFeed.vue index 25c06479..3e995b06 100644 --- a/client/components/modals/podcast/EpisodeFeed.vue +++ b/client/components/modals/podcast/EpisodeFeed.vue @@ -118,12 +118,15 @@ export default { toggleSelectEpisode(index) { this.$set(this.selectedEpisodes, String(index), !this.selectedEpisodes[String(index)]) }, + clearSelectedEpisodes() { + Object.keys(this.selectedEpisodes).forEach((key, idx) => this.$set(this.selectedEpisodes, String(idx), false)) + }, submit() { var episodesToDownload = [] if (this.episodesSelected.length) { episodesToDownload = this.episodesSelected.map((episodeIndex) => this.episodes[Number(episodeIndex)]) } - this.selectedEpisodes = [] + this.clearSelectedEpisodes() var payloadSize = JSON.stringify(episodesToDownload).length var sizeInMb = payloadSize / 1024 / 1024