Fix loading for cached subscriptions

This commit is contained in:
Preston 2020-09-02 21:04:08 -04:00
parent f895703446
commit 1bf2e51afc
1 changed files with 19 additions and 17 deletions

View File

@ -115,10 +115,8 @@ export default Vue.extend({
if (dataLimit !== null) {
this.dataLimit = dataLimit
}
setTimeout(async () => {
if (this.profileSubscriptions.videoList.length === 0) {
this.getSubscriptions()
} else {
if (this.profileSubscriptions.videoList.length !== 0) {
const subscriptionList = JSON.parse(JSON.stringify(this.profileSubscriptions))
if (this.hideWatchedSubs) {
this.videoList = await Promise.all(subscriptionList.videoList.filter((video) => {
@ -131,9 +129,13 @@ export default Vue.extend({
} else {
this.videoList = subscriptionList.videoList
}
this.isLoading = false
}
} else {
setTimeout(async () => {
this.getSubscriptions()
}, 200)
}
},
methods: {
getSubscriptions: function () {