Zhiyuan Zheng 2020-12-29 12:36:21 +01:00
parent 8e93492ae3
commit b92a01e2a4
No known key found for this signature in database
GPG Key ID: 078A93AB607D85E0
4 changed files with 17 additions and 13 deletions

View File

@ -60,21 +60,25 @@ const AccountInformation: React.FC<Props> = ({
{/* <Text>Moved or not: {account.moved}</Text> */} {/* <Text>Moved or not: {account.moved}</Text> */}
<View style={styles.avatarAndActions}> <View style={styles.avatarAndActions}>
<AccountInformationAvatar ref={shimmerAvatarRef} account={account} /> <AccountInformationAvatar ref={shimmerAvatarRef} account={account} />
{!disableActions && <AccountInformationActions account={account} />} {!disableActions ? (
<AccountInformationActions account={account} />
) : null}
</View> </View>
<AccountInformationName ref={shimmerNameRef} account={account} /> <AccountInformationName ref={shimmerNameRef} account={account} />
<AccountInformationAccount ref={shimmerAccountRef} account={account} /> <AccountInformationAccount ref={shimmerAccountRef} account={account} />
{account?.fields && account.fields.length > 0 && ( {account?.fields && account.fields.length > 0 ? (
<AccountInformationFields account={account} /> <AccountInformationFields account={account} />
)} ) : null}
{account?.note && account.note.length > 0 && account.note !== '<p></p>' && ( {account?.note &&
account.note.length > 0 &&
account.note !== '<p></p>' ? (
// Empty notes might generate empty p tag // Empty notes might generate empty p tag
<AccountInformationNotes account={account} /> <AccountInformationNotes account={account} />
)} ) : null}
<AccountInformationCreated ref={shimmerCreatedRef} account={account} /> <AccountInformationCreated ref={shimmerCreatedRef} account={account} />

View File

@ -37,16 +37,16 @@ const AccountInformationAccount = forwardRef<ShimmerPlaceholder, Props>(
> >
@{account?.acct} @{account?.acct}
</Text> </Text>
{account?.locked && ( {account?.locked ? (
<Feather name='lock' style={styles.type} color={theme.secondary} /> <Feather name='lock' style={styles.type} color={theme.secondary} />
)} ) : null}
{account?.bot && ( {account?.bot ? (
<Feather <Feather
name='hard-drive' name='hard-drive'
style={styles.type} style={styles.type}
color={theme.secondary} color={theme.secondary}
/> />
)} ) : null}
</View> </View>
</ShimmerPlaceholder> </ShimmerPlaceholder>
) )

View File

@ -124,7 +124,7 @@ const AccountInformationActions: React.FC<Props> = ({ account }) => {
return ( return (
<View style={styles.actions}> <View style={styles.actions}>
{query.data && !query.data.blocked_by && ( {query.data && !query.data.blocked_by ? (
<Button <Button
type='icon' type='icon'
content='mail' content='mail'
@ -140,7 +140,7 @@ const AccountInformationActions: React.FC<Props> = ({ account }) => {
} }
style={styles.actionConversation} style={styles.actionConversation}
/> />
)} ) : null}
{mainAction} {mainAction}
</View> </View>
) )

View File

@ -26,14 +26,14 @@ const AccountInformationFields: React.FC<Props> = ({ account }) => {
emojis={account.emojis} emojis={account.emojis}
showFullLink showFullLink
/> />
{field.verified_at && ( {field.verified_at ? (
<Feather <Feather
name='check-circle' name='check-circle'
size={StyleConstants.Font.Size.M} size={StyleConstants.Font.Size.M}
color={theme.primary} color={theme.primary}
style={styles.fieldCheck} style={styles.fieldCheck}
/> />
)} ) : null}
</View> </View>
<View style={styles.fieldRight}> <View style={styles.fieldRight}>
<ParseContent <ParseContent