mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Experiment with #558
This commit is contained in:
@ -98,19 +98,17 @@ const TimelineConversation: React.FC<Props> = ({ conversation, queryKey, highlig
|
||||
</View>
|
||||
|
||||
{conversation.last_status ? (
|
||||
<>
|
||||
<View
|
||||
style={{
|
||||
paddingTop: highlighted ? StyleConstants.Spacing.S : 0,
|
||||
paddingLeft: highlighted ? 0 : StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineContent />
|
||||
<TimelinePoll />
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
paddingTop: highlighted ? StyleConstants.Spacing.S : 0,
|
||||
paddingLeft: highlighted ? 0 : StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineContent />
|
||||
<TimelinePoll />
|
||||
|
||||
<TimelineActions />
|
||||
</>
|
||||
</View>
|
||||
) : null}
|
||||
</Pressable>
|
||||
</StatusContext.Provider>
|
||||
|
@ -103,8 +103,9 @@ const TimelineDefault: React.FC<Props> = ({
|
||||
paddingTop: highlighted ? StyleConstants.Spacing.S : 0,
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: (disableDetails ? StyleConstants.Avatar.XS : StyleConstants.Avatar.M) +
|
||||
StyleConstants.Spacing.S,
|
||||
: (disableDetails || isConversation
|
||||
? StyleConstants.Avatar.XS
|
||||
: StyleConstants.Avatar.M) + StyleConstants.Spacing.S,
|
||||
...(disableDetails && { marginTop: -StyleConstants.Spacing.S })
|
||||
}}
|
||||
>
|
||||
@ -115,9 +116,9 @@ const TimelineDefault: React.FC<Props> = ({
|
||||
<TimelineFullConversation />
|
||||
<TimelineTranslate />
|
||||
<TimelineFeedback />
|
||||
</View>
|
||||
|
||||
<TimelineActions />
|
||||
<TimelineActions />
|
||||
</View>
|
||||
</>
|
||||
)
|
||||
|
||||
|
@ -47,10 +47,6 @@ const TimelineNotifications: React.FC<Props> = ({ notification, queryKey }) => {
|
||||
const spoilerHidden = notification.status?.spoiler_text?.length
|
||||
? !instanceAccount.preferences?.['reading:expand:spoilers'] && !spoilerExpanded
|
||||
: false
|
||||
const copiableContent = useRef<{ content: string; complete: boolean }>({
|
||||
content: '',
|
||||
complete: false
|
||||
})
|
||||
|
||||
const { colors } = useTheme()
|
||||
const navigation = useNavigation<StackNavigationProp<TabLocalStackParamList>>()
|
||||
@ -101,11 +97,11 @@ const TimelineNotifications: React.FC<Props> = ({ notification, queryKey }) => {
|
||||
<TimelineAttachment />
|
||||
<TimelineCard />
|
||||
<TimelineFullConversation />
|
||||
|
||||
<TimelineActions />
|
||||
</View>
|
||||
) : null}
|
||||
</View>
|
||||
|
||||
<TimelineActions />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -263,63 +263,57 @@ const TimelineActions: React.FC = () => {
|
||||
}, [status.bookmarked])
|
||||
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
paddingLeft: highlighted ? 0 : StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
<Pressable
|
||||
{...(highlighted
|
||||
? {
|
||||
accessibilityLabel: t('shared.actions.reply.accessibilityLabel'),
|
||||
accessibilityRole: 'button'
|
||||
}
|
||||
: { accessibilityLabel: '' })}
|
||||
style={styles.action}
|
||||
onPress={onPressReply}
|
||||
children={childrenReply}
|
||||
/>
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
<Pressable
|
||||
{...(highlighted
|
||||
? {
|
||||
accessibilityLabel: t('shared.actions.reply.accessibilityLabel'),
|
||||
accessibilityRole: 'button'
|
||||
}
|
||||
: { accessibilityLabel: '' })}
|
||||
style={styles.action}
|
||||
onPress={onPressReply}
|
||||
children={childrenReply}
|
||||
/>
|
||||
|
||||
<Pressable
|
||||
{...(highlighted
|
||||
? {
|
||||
accessibilityLabel: t('shared.actions.reblogged.accessibilityLabel'),
|
||||
accessibilityRole: 'button'
|
||||
}
|
||||
: { accessibilityLabel: '' })}
|
||||
style={styles.action}
|
||||
onPress={onPressReblog}
|
||||
children={childrenReblog}
|
||||
disabled={
|
||||
status.visibility === 'direct' || (status.visibility === 'private' && !ownAccount)
|
||||
}
|
||||
/>
|
||||
<Pressable
|
||||
{...(highlighted
|
||||
? {
|
||||
accessibilityLabel: t('shared.actions.reblogged.accessibilityLabel'),
|
||||
accessibilityRole: 'button'
|
||||
}
|
||||
: { accessibilityLabel: '' })}
|
||||
style={styles.action}
|
||||
onPress={onPressReblog}
|
||||
children={childrenReblog}
|
||||
disabled={
|
||||
status.visibility === 'direct' || (status.visibility === 'private' && !ownAccount)
|
||||
}
|
||||
/>
|
||||
|
||||
<Pressable
|
||||
{...(highlighted
|
||||
? {
|
||||
accessibilityLabel: t('shared.actions.favourited.accessibilityLabel'),
|
||||
accessibilityRole: 'button'
|
||||
}
|
||||
: { accessibilityLabel: '' })}
|
||||
style={styles.action}
|
||||
onPress={onPressFavourite}
|
||||
children={childrenFavourite}
|
||||
/>
|
||||
<Pressable
|
||||
{...(highlighted
|
||||
? {
|
||||
accessibilityLabel: t('shared.actions.favourited.accessibilityLabel'),
|
||||
accessibilityRole: 'button'
|
||||
}
|
||||
: { accessibilityLabel: '' })}
|
||||
style={styles.action}
|
||||
onPress={onPressFavourite}
|
||||
children={childrenFavourite}
|
||||
/>
|
||||
|
||||
<Pressable
|
||||
{...(highlighted
|
||||
? {
|
||||
accessibilityLabel: t('shared.actions.bookmarked.accessibilityLabel'),
|
||||
accessibilityRole: 'button'
|
||||
}
|
||||
: { accessibilityLabel: '' })}
|
||||
style={styles.action}
|
||||
onPress={onPressBookmark}
|
||||
children={childrenBookmark}
|
||||
/>
|
||||
</View>
|
||||
<Pressable
|
||||
{...(highlighted
|
||||
? {
|
||||
accessibilityLabel: t('shared.actions.bookmarked.accessibilityLabel'),
|
||||
accessibilityRole: 'button'
|
||||
}
|
||||
: { accessibilityLabel: '' })}
|
||||
style={styles.action}
|
||||
onPress={onPressBookmark}
|
||||
children={childrenBookmark}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
@ -48,8 +48,7 @@ const TimelineAvatar: React.FC<Props> = ({ account }) => {
|
||||
style={{
|
||||
borderRadius: StyleConstants.Avatar.M,
|
||||
overflow: 'hidden',
|
||||
marginRight: StyleConstants.Spacing.S,
|
||||
marginLeft: isConversation ? StyleConstants.Avatar.M - StyleConstants.Avatar.XS : undefined
|
||||
marginRight: StyleConstants.Spacing.S
|
||||
}}
|
||||
/>
|
||||
)
|
||||
|
Reference in New Issue
Block a user