mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Refine RN 0.64
This commit is contained in:
@ -140,20 +140,13 @@ const TimelineConversation: React.FC<Props> = ({
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
<View
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
status={conversation.last_status}
|
||||
accts={conversation.accounts.map(account => account.acct)}
|
||||
reblog={false}
|
||||
/>
|
||||
</View>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
status={conversation.last_status}
|
||||
highlighted={highlighted}
|
||||
accts={conversation.accounts.map(account => account.acct)}
|
||||
reblog={false}
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
</Pressable>
|
||||
|
@ -132,27 +132,19 @@ const TimelineDefault: React.FC<Props> = ({
|
||||
<TimelineActionsUsers status={actualStatus} highlighted={highlighted} />
|
||||
|
||||
{queryKey && !disableDetails && (
|
||||
<View
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
rootQueryKey={rootQueryKey}
|
||||
status={actualStatus}
|
||||
accts={uniqBy(
|
||||
([actualStatus.account] as Mastodon.Account[] &
|
||||
Mastodon.Mention[])
|
||||
.concat(actualStatus.mentions)
|
||||
.filter(d => d.id !== instanceAccount?.id),
|
||||
d => d.id
|
||||
).map(d => d.acct)}
|
||||
reblog={item.reblog ? true : false}
|
||||
/>
|
||||
</View>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
rootQueryKey={rootQueryKey}
|
||||
highlighted={highlighted}
|
||||
status={actualStatus}
|
||||
accts={uniqBy(
|
||||
([actualStatus.account] as Mastodon.Account[] & Mastodon.Mention[])
|
||||
.concat(actualStatus.mentions)
|
||||
.filter(d => d?.id !== instanceAccount?.id),
|
||||
d => d.id
|
||||
).map(d => d.acct)}
|
||||
reblog={item.reblog ? true : false}
|
||||
/>
|
||||
)}
|
||||
</Pressable>
|
||||
)
|
||||
|
@ -129,28 +129,21 @@ const TimelineNotifications: React.FC<Props> = ({
|
||||
) : null}
|
||||
</View>
|
||||
|
||||
{notification.status && (
|
||||
<View
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
status={notification.status}
|
||||
accts={uniqBy(
|
||||
([notification.status.account] as Mastodon.Account[] &
|
||||
Mastodon.Mention[])
|
||||
.concat(notification.status.mentions)
|
||||
.filter(d => d.id !== instanceAccount?.id),
|
||||
d => d.id
|
||||
).map(d => d.acct)}
|
||||
reblog={false}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
{notification.status ? (
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
status={notification.status}
|
||||
highlighted={highlighted}
|
||||
accts={uniqBy(
|
||||
([notification.status.account] as Mastodon.Account[] &
|
||||
Mastodon.Mention[])
|
||||
.concat(notification.status.mentions)
|
||||
.filter(d => d.id !== instanceAccount?.id),
|
||||
d => d.id
|
||||
).map(d => d.acct)}
|
||||
reblog={false}
|
||||
/>
|
||||
) : null}
|
||||
</Pressable>
|
||||
)
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React, { useCallback, useRef, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { StyleSheet, Text, View } from 'react-native'
|
||||
import { Platform, StyleSheet, Text, View } from 'react-native'
|
||||
import { Circle } from 'react-native-animated-spinkit'
|
||||
import Animated, {
|
||||
Extrapolate,
|
||||
@ -45,6 +45,9 @@ const TimelineRefresh: React.FC<Props> = ({
|
||||
fetchingType,
|
||||
disableRefresh = false
|
||||
}) => {
|
||||
if (Platform.OS !== 'ios') {
|
||||
return null
|
||||
}
|
||||
if (disableRefresh) {
|
||||
return null
|
||||
}
|
||||
|
@ -17,13 +17,14 @@ import { useQueryClient } from 'react-query'
|
||||
export interface Props {
|
||||
queryKey: QueryKeyTimeline
|
||||
rootQueryKey?: QueryKeyTimeline
|
||||
highlighted: boolean
|
||||
status: Mastodon.Status
|
||||
accts: Mastodon.Account['acct'][] // When replying to conversations
|
||||
reblog: boolean
|
||||
}
|
||||
|
||||
const TimelineActions = React.memo(
|
||||
({ queryKey, rootQueryKey, status, accts, reblog }: Props) => {
|
||||
({ queryKey, rootQueryKey, highlighted, status, accts, reblog }: Props) => {
|
||||
const navigation = useNavigation()
|
||||
const { t } = useTranslation('componentTimeline')
|
||||
const { mode, theme } = useTheme()
|
||||
@ -256,7 +257,13 @@ const TimelineActions = React.memo(
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
<View
|
||||
style={{
|
||||
paddingLeft: highlighted
|
||||
? 0
|
||||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
<View style={styles.actions}>
|
||||
<Pressable
|
||||
style={styles.action}
|
||||
@ -285,7 +292,7 @@ const TimelineActions = React.memo(
|
||||
children={childrenBookmark}
|
||||
/>
|
||||
</View>
|
||||
</>
|
||||
</View>
|
||||
)
|
||||
},
|
||||
() => true
|
||||
|
@ -24,9 +24,9 @@ const TimelineFullConversation = React.memo(
|
||||
).length) ? (
|
||||
<Text
|
||||
style={{
|
||||
...StyleConstants.FontStyle.M,
|
||||
...StyleConstants.FontStyle.S,
|
||||
color: theme.blue,
|
||||
marginTop: StyleConstants.Font.Size.M / 2
|
||||
marginTop: StyleConstants.Font.Size.S
|
||||
}}
|
||||
>
|
||||
{t('shared.fullConversation')}
|
||||
|
Reference in New Issue
Block a user