Bump API SDK, add validation to MutedWords (#3055)

* Bump API SDK, add validation to MutedWords

* Tweaks to error state

* Comment

* Early return
This commit is contained in:
Eric Bailey 2024-02-29 19:30:30 -06:00 committed by GitHub
parent 21bdddcfbe
commit cecb6e4e69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 89 additions and 24 deletions

View file

@ -215,14 +215,12 @@ export function TagMenu({
if (isMuted) {
resetUpsert()
removeMutedWord({
value: sanitizedTag,
value: tag,
targets: ['tag'],
})
} else {
resetRemove()
upsertMutedWord([
{value: sanitizedTag, targets: ['tag']},
])
upsertMutedWord([{value: tag, targets: ['tag']}])
}
})
}}>

View file

@ -104,9 +104,9 @@ export function TagMenu({
: _(msg`Mute ${truncatedTag}`),
onPress() {
if (isMuted) {
removeMutedWord({value: sanitizedTag, targets: ['tag']})
removeMutedWord({value: tag, targets: ['tag']})
} else {
upsertMutedWord([{value: sanitizedTag, targets: ['tag']}])
upsertMutedWord([{value: tag, targets: ['tag']}])
}
},
testID: 'tagMenuMute',
@ -127,7 +127,6 @@ export function TagMenu({
preferences,
tag,
truncatedTag,
sanitizedTag,
upsertMutedWord,
removeMutedWord,
])