mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-14 05:29:27 +01:00
Add proper logic for route change
This commit is contained in:
parent
1bf2e51afc
commit
9b7b240de4
@ -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 = []
|
||||
|
Loading…
Reference in New Issue
Block a user