mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Account actions working for #638
This commit is contained in:
@ -37,7 +37,8 @@ const TimelineActioned: React.FC<Props> = ({ action, isNotification, ...rest })
|
||||
/>
|
||||
)
|
||||
|
||||
const onPress = () => navigation.push('Tab-Shared-Account', { account })
|
||||
const onPress = () =>
|
||||
navigation.push('Tab-Shared-Account', { account, isRemote: status?._remote })
|
||||
|
||||
const children = () => {
|
||||
switch (action) {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import Button from '@components/Button'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import { StackNavigationProp } from '@react-navigation/stack'
|
||||
import { RootStackParamList } from '@utils/navigation/navigators'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Alert } from 'react-native'
|
||||
|
||||
export interface Props {
|
||||
sensitiveShown: boolean
|
||||
@ -14,7 +13,7 @@ const AttachmentAltText: React.FC<Props> = ({ sensitiveShown, text }) => {
|
||||
return null
|
||||
}
|
||||
|
||||
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>()
|
||||
const { t } = useTranslation('componentTimeline')
|
||||
|
||||
return !sensitiveShown ? (
|
||||
<Button
|
||||
@ -28,7 +27,7 @@ const AttachmentAltText: React.FC<Props> = ({ sensitiveShown, text }) => {
|
||||
type='text'
|
||||
content='ALT'
|
||||
fontBold
|
||||
onPress={() => navigation.navigate('Screen-Actions', { type: 'alt_text', text })}
|
||||
onPress={() => Alert.alert(t('shared.attachment.altText'), text)}
|
||||
/>
|
||||
) : null
|
||||
}
|
||||
|
@ -31,7 +31,8 @@ const TimelineAvatar: React.FC<Props> = ({ account }) => {
|
||||
})
|
||||
})}
|
||||
onPress={() =>
|
||||
!disableOnPress && navigation.push('Tab-Shared-Account', { account: actualAccount })
|
||||
!disableOnPress &&
|
||||
navigation.push('Tab-Shared-Account', { account: actualAccount, isRemote: status?._remote })
|
||||
}
|
||||
uri={{ original: actualAccount.avatar, static: actualAccount.avatar_static }}
|
||||
dimension={
|
||||
|
@ -14,7 +14,7 @@ export interface Props {
|
||||
}
|
||||
|
||||
const TimelineContent: React.FC<Props> = ({ notificationOwnToot = false, setSpoilerExpanded }) => {
|
||||
const { status, highlighted, inThread, disableDetails } = useContext(StatusContext)
|
||||
const { status, highlighted, inThread } = useContext(StatusContext)
|
||||
if (!status || typeof status.content !== 'string' || !status.content.length) return null
|
||||
|
||||
const { colors } = useTheme()
|
||||
|
@ -40,7 +40,12 @@ const HeaderSharedReplies: React.FC = () => {
|
||||
<CustomText
|
||||
style={{ color: colors.blue, paddingLeft: StyleConstants.Spacing.S }}
|
||||
children={`@${mention.username}`}
|
||||
onPress={() => navigation.push('Tab-Shared-Account', { account: mention })}
|
||||
onPress={() =>
|
||||
navigation.push('Tab-Shared-Account', {
|
||||
account: mention,
|
||||
isRemote: status?._remote
|
||||
})
|
||||
}
|
||||
/>
|
||||
</Fragment>
|
||||
))}
|
||||
|
Reference in New Issue
Block a user