From 9b7b240de494aa8012271d677364da46865c0748 Mon Sep 17 00:00:00 2001 From: Preston Date: Wed, 2 Sep 2020 21:06:49 -0400 Subject: [PATCH] Add proper logic for route change --- src/renderer/views/Channel/Channel.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/renderer/views/Channel/Channel.js b/src/renderer/views/Channel/Channel.js index e0754ecd4..0f4916995 100644 --- a/src/renderer/views/Channel/Channel.js +++ b/src/renderer/views/Channel/Channel.js @@ -149,6 +149,28 @@ export default Vue.extend({ } }, watch: { + $route() { + // react to route changes... + this.id = this.$route.params.id + this.isLoading = true + + if (!this.usingElectron) { + this.getVideoInformationInvidious() + } else { + switch (this.backendPreference) { + case 'local': + this.getChannelInfoLocal() + this.getChannelVideosLocal() + this.getPlaylistsLocal() + break + case 'invidious': + this.getChannelInfoInvidious() + this.getPlaylistsInvidious() + break + } + } + }, + videoSortBy () { this.isElementListLoading = true this.latestVideos = []