another attempt at fixing title update

This commit is contained in:
ArabCoders 2024-12-30 10:42:02 +03:00
parent 2528d3df25
commit 1bcad666be

View file

@ -17,12 +17,19 @@ onMounted(() => {
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` }) 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) { if (!config.app.ui_update_title) {
return return
} }
console.log('logging watch event')
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` }) useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` })
}, { deep: true }) }, { 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 })
</script> </script>