Skip to content

Commit

Permalink
make thumbnailsize and errorcount unreactive
Browse files Browse the repository at this point in the history
Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>
  • Loading branch information
ChunkyProgrammer and absidue committed Nov 10, 2024
1 parent 7e75f4b commit 1620257
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/renderer/views/SubscribedChannels/SubscribedChannels.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ const re = {
ivToYt: /^.+ggpht\/(.+)/
}
const ytBaseURL = 'https://yt3.ggpht.com'
const thumbnailSize = 176
let errorCount = 0
const query = ref('')
const subscribedChannels = ref([])
const filteredChannels = ref([])
const thumbnailSize = ref(176)
const errorCount = ref(0)
/** @type {import('vue').Ref<HTMLInputElement | null>} */
const searchBarChannels = ref(null)
Expand Down Expand Up @@ -185,11 +185,11 @@ function thumbnailURL(originalURL) {
}
}
return newURL.replace(re.url, `$1${thumbnailSize.value}$2`)
return newURL.replace(re.url, `$1${thumbnailSize}$2`)
}
function updateThumbnail(channel) {
errorCount.value += 1
errorCount += 1
if (backendPreference.value === 'local') {
// avoid too many concurrent requests
setTimeout(() => {
Expand All @@ -202,7 +202,7 @@ function updateThumbnail(channel) {
})
}
})
}, errorCount.value * 500)
}, errorCount * 500)
} else {
setTimeout(() => {
invidiousGetChannelInfo(channel.id).then(response => {
Expand All @@ -212,7 +212,7 @@ function updateThumbnail(channel) {
channelId: channel.id
})
})
}, errorCount.value * 500)
}, errorCount * 500)
}
}
Expand Down

0 comments on commit 1620257

Please sign in to comment.