1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
xmflsct
2022-12-18 17:25:18 +01:00
parent c0aad41047
commit 2c7772d4c2
23 changed files with 251 additions and 196 deletions

View File

@ -7,10 +7,7 @@ const menuShare = (
params:
| {
visibility?: Mastodon.Status['visibility']
copiableContent?: React.MutableRefObject<{
content?: string | undefined
complete: boolean
}>
rawContent?: React.MutableRefObject<string[]>
type: 'status'
url?: string
}
@ -48,17 +45,17 @@ const menuShare = (
icon: 'square.and.arrow.up'
})
}
if (params.type === 'status' && Platform.OS === 'ios')
if (params.type === 'status')
menus[0].push({
key: 'copy',
item: {
onSelect: () => {
Clipboard.setString(params.copiableContent?.current.content || '')
Clipboard.setString(params.rawContent?.current.join(`\n\n`) || '')
displayMessage({ type: 'success', message: t(`copy.succeed`) })
},
disabled: false,
destructive: false,
hidden: !params.copiableContent?.current.content?.length
hidden: !params.rawContent?.current.length
},
title: t('copy.action'),
icon: 'doc.on.doc'