1
0
mirror of https://github.com/tooot-app/app synced 2025-02-08 16:08:44 +01:00
This commit is contained in:
xmflsct 2023-03-18 23:18:09 +01:00
parent 0ca2047f89
commit 0d8fdf5740
2 changed files with 12 additions and 15 deletions

View File

@ -176,18 +176,14 @@ const TabMePreferencesFilter: React.FC<
...(parseInt(expiration) && { ...(parseInt(expiration) && {
expires_in: parseInt(expiration) expires_in: parseInt(expiration)
}), }),
...(keywords.filter(keyword => keyword.length).length keywords_attributes: keywords.map((keyword, index) =>
? { !!params.filter.keywords[index]
keywords_attributes: keywords ? {
.filter(keyword => keyword.length) id: params.filter.keywords[index].id,
.map(keyword => ({ keyword, whole_word: true })) ...(keyword.length ? { keyword, whole_word: true } : { _destroy: true })
} }
: params.filter.keywords.length && { : { keyword, whole_word: true }
keywords_attributes: params.filter.keywords.map(keyword => ({ )
...keyword,
_destroy: true
}))
})
} }
}) })
.then(() => { .then(() => {

View File

@ -37,9 +37,10 @@ const AccountInformationActions: React.FC = () => {
return ( return (
<View style={styles.base}> <View style={styles.base}>
<Button <Button
type='text' round
type='icon'
disabled={account === undefined} disabled={account === undefined}
content={t('me.stacks.profile.name')} content='edit-3'
onPress={() => navigation.navigate('Tab-Me-Profile')} onPress={() => navigation.navigate('Tab-Me-Profile')}
/> />
<Button <Button
@ -47,7 +48,7 @@ const AccountInformationActions: React.FC = () => {
type='icon' type='icon'
disabled={account === undefined} disabled={account === undefined}
content='sliders' content='sliders'
style={{ marginLeft: StyleConstants.Spacing.S }} style={{ marginLeft: StyleConstants.Spacing.M }}
onPress={() => onPress={() =>
navigation.navigate('Tab-Me-Preferences', { screen: 'Tab-Me-Preferences-Root' }) navigation.navigate('Tab-Me-Preferences', { screen: 'Tab-Me-Preferences-Root' })
} }