Allow unmuting and unblocking of curate lists, but not the opposite (#3817)

zio/stable
Eric Bailey 2024-05-02 10:17:17 -05:00 committed by GitHub
parent cc9727a844
commit c2062753c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 15 deletions

View File

@ -454,33 +454,29 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) {
},
})
}
if (isCurateList) {
if (isCurateList && (isBlocking || isMuting)) {
items.push({label: 'separator'})
if (!isBlocking) {
if (isMuting) {
items.push({
testID: 'listHeaderDropdownMuteBtn',
label: isMuting ? _(msg`Un-mute list`) : _(msg`Mute list`),
onPress: isMuting
? onUnsubscribeMute
: subscribeMutePromptControl.open,
label: _(msg`Un-mute list`),
onPress: onUnsubscribeMute,
icon: {
ios: {
name: isMuting ? 'eye' : 'eye.slash',
name: 'eye',
},
android: '',
web: isMuting ? 'eye' : ['far', 'eye-slash'],
web: 'eye',
},
})
}
if (!isMuting) {
if (isBlocking) {
items.push({
testID: 'listHeaderDropdownBlockBtn',
label: isBlocking ? _(msg`Un-block list`) : _(msg`Block list`),
onPress: isBlocking
? onUnsubscribeBlock
: subscribeBlockPromptControl.open,
label: _(msg`Un-block list`),
onPress: onUnsubscribeBlock,
icon: {
ios: {
name: 'person.fill.xmark',
@ -508,9 +504,7 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) {
isBlocking,
isMuting,
onUnsubscribeMute,
subscribeMutePromptControl.open,
onUnsubscribeBlock,
subscribeBlockPromptControl.open,
])
const subscribeDropdownItems: DropdownItem[] = useMemo(() => {