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) && {
expires_in: parseInt(expiration)
}),
...(keywords.filter(keyword => keyword.length).length
? {
keywords_attributes: keywords
.filter(keyword => keyword.length)
.map(keyword => ({ keyword, whole_word: true }))
}
: params.filter.keywords.length && {
keywords_attributes: params.filter.keywords.map(keyword => ({
...keyword,
_destroy: true
}))
})
keywords_attributes: keywords.map((keyword, index) =>
!!params.filter.keywords[index]
? {
id: params.filter.keywords[index].id,
...(keyword.length ? { keyword, whole_word: true } : { _destroy: true })
}
: { keyword, whole_word: true }
)
}
})
.then(() => {

View File

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