feat: add preference to hide emojis in usernames (#1612)

This commit is contained in:
Tuur Martens 2023-02-04 18:02:05 +01:00 committed by GitHub
parent 0258894484
commit e92d1c6adf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 91 additions and 6 deletions

View file

@ -11,6 +11,8 @@ const { t } = useI18n()
const { data: account, pending, refresh } = $(await useAsyncData(() => fetchAccountByHandle(accountName).catch(() => null), { immediate: process.client, default: () => shallowRef() }))
const relationship = $computed(() => account ? useRelationship(account).value : undefined)
const userSettings = useUserSettings()
onReactivated(() => {
// Silently update data when reentering the page
// The user will see the previous content first, and any changes will be updated to the UI when the request is completed
@ -21,7 +23,11 @@ onReactivated(() => {
<template>
<MainContent back>
<template #title>
<ContentRich timeline-title-style :content="account ? getDisplayName(account) : t('nav.profile')" />
<ContentRich
timeline-title-style
:content="account ? getDisplayName(account) : t('nav.profile')"
:show-emojis="!getPreferences(userSettings, 'hideUsernameEmojis')"
/>
</template>
<template v-if="pending" />