1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Merge pull request #345 from tooot-app/main

Release v4.1.4
This commit is contained in:
xmflsct
2022-06-19 12:53:07 +02:00
committed by GitHub
5 changed files with 9 additions and 7 deletions

View File

@ -4,7 +4,7 @@
"native": "220603",
"major": 4,
"minor": 1,
"patch": 3,
"patch": 4,
"expo": "45.0.0"
},
"description": "tooot app for Mastodon",

View File

@ -29,7 +29,7 @@ const contextMenuInstance = ({
const { theme } = useTheme()
const currentInstance = useSelector(getInstanceUrl)
const instance = status.uri && status.uri.split(new RegExp(/\/\/(.*?)\//))[1]
const instance = status?.uri && status.uri.split(new RegExp(/\/\/(.*?)\//))[1]
const queryClient = useQueryClient()
const mutation = useTimelineMutation({

View File

@ -70,7 +70,7 @@ const contextMenuStatus = ({
getInstanceAccount,
(prev, next) => prev.id === next.id
)
const ownAccount = instanceAccount?.id === status.account.id
const ownAccount = instanceAccount?.id === status?.account.id
if (ownAccount) {
const accountMenuItems: ContextMenuAction[] = [

View File

@ -48,14 +48,16 @@ const TimelineTranslate = React.memo(
const [detectedLanguage, setDetectedLanguage] = useState<string>('')
useEffect(() => {
const detect = async () => {
const result = await detectLanguage(text.join(`\n\n`))
setDetectedLanguage(result.detected.slice(0, 2))
const result = await detectLanguage(text.join(`\n\n`)).catch(() => {
// No need to log language detection failure
})
result?.detected && setDetectedLanguage(result.detected.slice(0, 2))
}
detect()
}, [])
const settingsLanguage = useSelector(getSettingsLanguage)
const targetLanguage = settingsLanguage || Localization.locale || 'en'
const targetLanguage = Localization.locale || settingsLanguage || 'en'
const [enabled, setEnabled] = useState(false)
const { refetch, data, isLoading, isSuccess, isError } = useTranslateQuery({

View File

@ -4,7 +4,7 @@
"title": "Hành động người dùng",
"mute": {
"action_false": "Ẩn người này",
"action_true": "Tương tác người dùng"
"action_true": "Bỏ ẩn người dùng"
},
"block": {
"action_false": "Chặn người này",