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