From 1bcad666be9ac1a23a27d897459fa02c4115b4d1 Mon Sep 17 00:00:00 2001 From: ArabCoders Date: Mon, 30 Dec 2024 10:42:02 +0300 Subject: [PATCH] another attempt at fixing title update --- ui/pages/index.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/pages/index.vue b/ui/pages/index.vue index 1bdda7e1..690dece6 100644 --- a/ui/pages/index.vue +++ b/ui/pages/index.vue @@ -17,12 +17,19 @@ onMounted(() => { useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` }) }) -watch([stateStore.queue, stateStore.history], () => { +watch(() => stateStore.history, () => { if (!config.app.ui_update_title) { return } - console.log('logging watch event') useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` }) }, { deep: true }) +watch(() => stateStore.queue, () => { + if (!config.app.ui_update_title) { + return + } + useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` }) +}, { deep: true }) + +