From d838fbe2905bbcf96e852cd38946e986d2b80c6a Mon Sep 17 00:00:00 2001 From: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> Date: Sun, 10 Nov 2024 15:46:20 -0500 Subject: [PATCH] make thumbnailsize and errorcount unreactive Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com> --- .../views/SubscribedChannels/SubscribedChannels.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer/views/SubscribedChannels/SubscribedChannels.vue b/src/renderer/views/SubscribedChannels/SubscribedChannels.vue index 52b70f9b7..d3c1adf6a 100644 --- a/src/renderer/views/SubscribedChannels/SubscribedChannels.vue +++ b/src/renderer/views/SubscribedChannels/SubscribedChannels.vue @@ -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} */ const searchBarChannels = ref(null) @@ -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(() => { @@ -202,7 +202,7 @@ function updateThumbnail(channel) { }) } }) - }, errorCount.value * 500) + }, errorCount * 500) } else { setTimeout(() => { invidiousGetChannelInfo(channel.id).then(response => { @@ -212,7 +212,7 @@ function updateThumbnail(channel) { channelId: channel.id }) }) - }, errorCount.value * 500) + }, errorCount * 500) } }