fix: respect always expand content warnings

This commit is contained in:
patak 2023-05-04 22:29:47 +02:00
parent e9de11000b
commit 16561845f8
2 changed files with 18 additions and 3 deletions

View file

@ -1,11 +1,13 @@
<script setup lang="ts">
const props = defineProps<{ enabled?: boolean; filter?: boolean; isDM?: boolean }>()
const showContent = ref(!props.enabled)
const expandSpoilersByDefault = computed(() => currentUser.value ? getExpandSpoilersByDefault(currentUser.value.account) : false)
const showContent = ref(expandSpoilersByDefault.value ? true : !props.enabled)
const toggleContent = useToggle(showContent)
watchEffect(() => {
showContent.value = !props.enabled
showContent.value = expandSpoilersByDefault.value ? true : !props.enabled
})
</script>