mirror of https://github.com/tooot-app/app
commit
d32458689b
|
@ -4,7 +4,7 @@
|
|||
"native": "210511",
|
||||
"major": 2,
|
||||
"minor": 0,
|
||||
"patch": 4,
|
||||
"patch": 5,
|
||||
"expo": "41.0.0"
|
||||
},
|
||||
"description": "tooot app for Mastodon",
|
||||
|
|
|
@ -128,7 +128,7 @@ const TimelineConversation: React.FC<Props> = ({
|
|||
status={conversation.last_status}
|
||||
highlighted={highlighted}
|
||||
/>
|
||||
{conversation.last_status.poll && (
|
||||
{conversation.last_status.poll ? (
|
||||
<TimelinePoll
|
||||
queryKey={queryKey}
|
||||
statusId={conversation.last_status.id}
|
||||
|
@ -138,7 +138,7 @@ const TimelineConversation: React.FC<Props> = ({
|
|||
conversation.last_status.id === instanceAccount?.id
|
||||
}
|
||||
/>
|
||||
)}
|
||||
) : null}
|
||||
</View>
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
|
|
|
@ -116,13 +116,13 @@ const TimelineDefault: React.FC<Props> = ({
|
|||
}}
|
||||
>
|
||||
{typeof actualStatus.content === 'string' &&
|
||||
actualStatus.content.length > 0 && (
|
||||
<TimelineContent
|
||||
status={actualStatus}
|
||||
highlighted={highlighted}
|
||||
disableDetails={disableDetails}
|
||||
/>
|
||||
)}
|
||||
actualStatus.content.length > 0 ? (
|
||||
<TimelineContent
|
||||
status={actualStatus}
|
||||
highlighted={highlighted}
|
||||
disableDetails={disableDetails}
|
||||
/>
|
||||
) : null}
|
||||
{queryKey && actualStatus.poll ? (
|
||||
<TimelinePoll
|
||||
queryKey={queryKey}
|
||||
|
@ -138,9 +138,9 @@ const TimelineDefault: React.FC<Props> = ({
|
|||
actualStatus.media_attachments.length ? (
|
||||
<TimelineAttachment status={actualStatus} />
|
||||
) : null}
|
||||
{!disableDetails && actualStatus.card && (
|
||||
{!disableDetails && actualStatus.card ? (
|
||||
<TimelineCard card={actualStatus.card} />
|
||||
)}
|
||||
) : null}
|
||||
{!disableDetails ? (
|
||||
<TimelineFullConversation queryKey={queryKey} status={actualStatus} />
|
||||
) : null}
|
||||
|
@ -148,7 +148,7 @@ const TimelineDefault: React.FC<Props> = ({
|
|||
<TimelineActionsUsers status={actualStatus} highlighted={highlighted} />
|
||||
</View>
|
||||
|
||||
{queryKey && !disableDetails && (
|
||||
{queryKey && !disableDetails ? (
|
||||
<TimelineActions
|
||||
queryKey={queryKey}
|
||||
rootQueryKey={rootQueryKey}
|
||||
|
@ -162,7 +162,7 @@ const TimelineDefault: React.FC<Props> = ({
|
|||
).map(d => d?.acct)}
|
||||
reblog={item.reblog ? true : false}
|
||||
/>
|
||||
)}
|
||||
) : null}
|
||||
</Pressable>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -113,13 +113,13 @@ const TimelineNotifications: React.FC<Props> = ({
|
|||
: StyleConstants.Avatar.M + StyleConstants.Spacing.S
|
||||
}}
|
||||
>
|
||||
{notification.status.content.length > 0 && (
|
||||
{notification.status.content.length > 0 ? (
|
||||
<TimelineContent
|
||||
status={notification.status}
|
||||
highlighted={highlighted}
|
||||
/>
|
||||
)}
|
||||
{notification.status.poll && (
|
||||
) : null}
|
||||
{notification.status.poll ? (
|
||||
<TimelinePoll
|
||||
queryKey={queryKey}
|
||||
statusId={notification.status.id}
|
||||
|
@ -127,13 +127,13 @@ const TimelineNotifications: React.FC<Props> = ({
|
|||
reblog={false}
|
||||
sameAccount={notification.account.id === instanceAccount?.id}
|
||||
/>
|
||||
)}
|
||||
{notification.status.media_attachments.length > 0 && (
|
||||
) : null}
|
||||
{notification.status.media_attachments.length > 0 ? (
|
||||
<TimelineAttachment status={notification.status} />
|
||||
)}
|
||||
{notification.status.card && (
|
||||
) : null}
|
||||
{notification.status.card ? (
|
||||
<TimelineCard card={notification.status.card} />
|
||||
)}
|
||||
) : null}
|
||||
<TimelineFullConversation
|
||||
queryKey={queryKey}
|
||||
status={notification.status}
|
||||
|
|
|
@ -182,7 +182,7 @@ const TimelineActions: React.FC<Props> = ({
|
|||
color={iconColor}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
/>
|
||||
{status.replies_count > 0 && (
|
||||
{status.replies_count > 0 ? (
|
||||
<Text
|
||||
style={{
|
||||
color: theme.secondary,
|
||||
|
@ -192,7 +192,7 @@ const TimelineActions: React.FC<Props> = ({
|
|||
>
|
||||
{status.replies_count}
|
||||
</Text>
|
||||
)}
|
||||
) : null}
|
||||
</>
|
||||
),
|
||||
[status.replies_count]
|
||||
|
@ -210,7 +210,7 @@ const TimelineActions: React.FC<Props> = ({
|
|||
}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
/>
|
||||
{status.reblogs_count > 0 && (
|
||||
{status.reblogs_count > 0 ? (
|
||||
<Text
|
||||
style={{
|
||||
color: color(status.reblogged),
|
||||
|
@ -220,7 +220,7 @@ const TimelineActions: React.FC<Props> = ({
|
|||
>
|
||||
{status.reblogs_count}
|
||||
</Text>
|
||||
)}
|
||||
) : null}
|
||||
</>
|
||||
)
|
||||
}, [status.reblogged, status.reblogs_count])
|
||||
|
@ -233,7 +233,7 @@ const TimelineActions: React.FC<Props> = ({
|
|||
color={color(status.favourited)}
|
||||
size={StyleConstants.Font.Size.L}
|
||||
/>
|
||||
{status.favourites_count > 0 && (
|
||||
{status.favourites_count > 0 ? (
|
||||
<Text
|
||||
style={{
|
||||
color: color(status.favourited),
|
||||
|
@ -244,7 +244,7 @@ const TimelineActions: React.FC<Props> = ({
|
|||
>
|
||||
{status.favourites_count}
|
||||
</Text>
|
||||
)}
|
||||
) : null}
|
||||
</>
|
||||
)
|
||||
}, [status.favourited, status.favourites_count])
|
||||
|
|
|
@ -74,7 +74,7 @@ const AttachmentAudio: React.FC<Props> = ({
|
|||
) : null
|
||||
) : (
|
||||
<>
|
||||
{audio.preview_url && (
|
||||
{audio.preview_url ? (
|
||||
<GracefullyImage
|
||||
uri={{
|
||||
original: audio.preview_url,
|
||||
|
@ -82,7 +82,7 @@ const AttachmentAudio: React.FC<Props> = ({
|
|||
}}
|
||||
style={styles.background}
|
||||
/>
|
||||
)}
|
||||
) : null}
|
||||
<Button
|
||||
type='icon'
|
||||
content={audioPlaying ? 'PauseCircle' : 'PlayCircle'}
|
||||
|
|
|
@ -27,14 +27,14 @@ const TimelineCard = React.memo(
|
|||
}}
|
||||
testID='base'
|
||||
>
|
||||
{card.image && (
|
||||
{card.image ? (
|
||||
<GracefullyImage
|
||||
uri={{ original: card.image }}
|
||||
blurhash={card.blurhash}
|
||||
style={styles.left}
|
||||
imageStyle={styles.image}
|
||||
/>
|
||||
)}
|
||||
) : null}
|
||||
<View style={styles.right}>
|
||||
<Text
|
||||
numberOfLines={2}
|
||||
|
|
|
@ -107,15 +107,15 @@ const ScreenActionsRoot = React.memo(
|
|||
case 'status':
|
||||
return (
|
||||
<>
|
||||
{!sameAccount && (
|
||||
{!sameAccount ? (
|
||||
<ActionsAccount
|
||||
queryKey={params.queryKey}
|
||||
rootQueryKey={params.rootQueryKey}
|
||||
account={params.status.account}
|
||||
dismiss={dismiss}
|
||||
/>
|
||||
)}
|
||||
{sameAccount && params.status && (
|
||||
) : null}
|
||||
{sameAccount && params.status ? (
|
||||
<ActionsStatus
|
||||
navigation={navigation}
|
||||
queryKey={params.queryKey}
|
||||
|
@ -123,22 +123,22 @@ const ScreenActionsRoot = React.memo(
|
|||
status={params.status}
|
||||
dismiss={dismiss}
|
||||
/>
|
||||
)}
|
||||
{!sameDomain && statusDomain && (
|
||||
) : null}
|
||||
{!sameDomain && statusDomain ? (
|
||||
<ActionsDomain
|
||||
queryKey={params.queryKey}
|
||||
rootQueryKey={params.rootQueryKey}
|
||||
domain={statusDomain}
|
||||
dismiss={dismiss}
|
||||
/>
|
||||
)}
|
||||
{params.status.visibility !== 'direct' && (
|
||||
) : null}
|
||||
{params.status.visibility !== 'direct' ? (
|
||||
<ActionsShare
|
||||
url={params.status.url || params.status.uri}
|
||||
type={params.type}
|
||||
dismiss={dismiss}
|
||||
/>
|
||||
)}
|
||||
) : null}
|
||||
<Button
|
||||
type='text'
|
||||
content={t('common:buttons.cancel')}
|
||||
|
@ -152,9 +152,9 @@ const ScreenActionsRoot = React.memo(
|
|||
case 'account':
|
||||
return (
|
||||
<>
|
||||
{!sameAccount && (
|
||||
{!sameAccount ? (
|
||||
<ActionsAccount account={params.account} dismiss={dismiss} />
|
||||
)}
|
||||
) : null}
|
||||
<ActionsShare
|
||||
url={params.account.url}
|
||||
type={params.type}
|
||||
|
|
|
@ -130,7 +130,7 @@ const ComposeAttachments: React.FC<Props> = ({ accessibleRefAttachments }) => {
|
|||
uri: item.local?.local_thumbnail || item.remote?.preview_url
|
||||
}}
|
||||
/>
|
||||
{item.remote?.meta?.original?.duration && (
|
||||
{item.remote?.meta?.original?.duration ? (
|
||||
<Text
|
||||
style={[
|
||||
styles.duration,
|
||||
|
@ -142,7 +142,7 @@ const ComposeAttachments: React.FC<Props> = ({ accessibleRefAttachments }) => {
|
|||
>
|
||||
{item.remote.meta.original.duration}
|
||||
</Text>
|
||||
)}
|
||||
) : null}
|
||||
{item.uploading ? (
|
||||
<View
|
||||
style={[
|
||||
|
|
|
@ -18,11 +18,11 @@ const ComposeRootHeader: React.FC = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
{instanceActive !== -1 && localInstances.length > 1 && (
|
||||
{instanceActive !== -1 && localInstances.length > 1 ? (
|
||||
<View style={styles.postingAs}>
|
||||
<ComposePostingAs />
|
||||
</View>
|
||||
)}
|
||||
) : null}
|
||||
{composeState.spoiler.active ? <ComposeSpoilerInput /> : null}
|
||||
<ComposeTextInput />
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue