mirror of https://github.com/tooot-app/app
Fix menu translations
This commit is contained in:
parent
6b6481f9ac
commit
a68ed6ea1b
|
@ -3,7 +3,7 @@
|
||||||
"versions": {
|
"versions": {
|
||||||
"native": "220806",
|
"native": "220806",
|
||||||
"major": 4,
|
"major": 4,
|
||||||
"minor": 3,
|
"minor": 2,
|
||||||
"patch": 0,
|
"patch": 0,
|
||||||
"expo": "46.0.0"
|
"expo": "46.0.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,8 +41,8 @@ const contextMenuAccount = ({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: t('common:message.success.message', {
|
message: t('common:message.success.message', {
|
||||||
function: t(`account.${theParams.payload.property}.action`, {
|
function: t(`account.${theParams.payload.property}.action`, {
|
||||||
...(typeof theParams.payload.currentValue === 'boolean' && {
|
...(theParams.payload.property !== 'reports' && {
|
||||||
context: theParams.payload.currentValue.toString()
|
context: (theParams.payload.currentValue || false).toString()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -55,8 +55,8 @@ const contextMenuAccount = ({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: t('common:message.error.message', {
|
message: t('common:message.error.message', {
|
||||||
function: t(`account.${theParams.payload.property}.action`, {
|
function: t(`account.${theParams.payload.property}.action`, {
|
||||||
...(typeof theParams.payload.currentValue === 'boolean' && {
|
...(theParams.payload.property !== 'reports' && {
|
||||||
context: theParams.payload.currentValue.toString()
|
context: (theParams.payload.currentValue || false).toString()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -6,11 +6,10 @@ import Icon from '@components/Icon'
|
||||||
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { useContext } from 'react'
|
import React from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Platform, Pressable, View } from 'react-native'
|
import { Pressable, View } from 'react-native'
|
||||||
import ContextMenu, { ContextMenuAction } from 'react-native-context-menu-view'
|
import ContextMenu, { ContextMenuAction } from 'react-native-context-menu-view'
|
||||||
import { ContextMenuContext } from './ContextMenu'
|
|
||||||
import HeaderSharedAccount from './HeaderShared/Account'
|
import HeaderSharedAccount from './HeaderShared/Account'
|
||||||
import HeaderSharedApplication from './HeaderShared/Application'
|
import HeaderSharedApplication from './HeaderShared/Application'
|
||||||
import HeaderSharedCreated from './HeaderShared/Created'
|
import HeaderSharedCreated from './HeaderShared/Created'
|
||||||
|
|
|
@ -20,7 +20,7 @@ import HeaderSharedMuted from './HeaderShared/Muted'
|
||||||
import HeaderSharedVisibility from './HeaderShared/Visibility'
|
import HeaderSharedVisibility from './HeaderShared/Visibility'
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
queryKey?: QueryKeyTimeline
|
queryKey: QueryKeyTimeline
|
||||||
notification: Mastodon.Notification
|
notification: Mastodon.Notification
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,18 +39,18 @@ const TimelineHeaderNotification = ({ queryKey, notification }: Props) => {
|
||||||
: null
|
: null
|
||||||
const statusOnPress = contextMenuStatus({
|
const statusOnPress = contextMenuStatus({
|
||||||
actions: contextMenuActions,
|
actions: contextMenuActions,
|
||||||
status,
|
status: status!,
|
||||||
queryKey
|
queryKey
|
||||||
})
|
})
|
||||||
const accountOnPress = contextMenuAccount({
|
const accountOnPress = contextMenuAccount({
|
||||||
actions: contextMenuActions,
|
actions: contextMenuActions,
|
||||||
type: 'status',
|
type: 'status',
|
||||||
queryKey,
|
queryKey,
|
||||||
id: status?.account.id
|
id: status!.account.id
|
||||||
})
|
})
|
||||||
const instanceOnPress = contextMenuInstance({
|
const instanceOnPress = contextMenuInstance({
|
||||||
actions: contextMenuActions,
|
actions: contextMenuActions,
|
||||||
status,
|
status: status!,
|
||||||
queryKey
|
queryKey
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue