Allow unmuting and unblocking of curate lists, but not the opposite (#3817)
parent
cc9727a844
commit
c2062753c5
|
@ -454,33 +454,29 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (isCurateList) {
|
if (isCurateList && (isBlocking || isMuting)) {
|
||||||
items.push({label: 'separator'})
|
items.push({label: 'separator'})
|
||||||
|
|
||||||
if (!isBlocking) {
|
if (isMuting) {
|
||||||
items.push({
|
items.push({
|
||||||
testID: 'listHeaderDropdownMuteBtn',
|
testID: 'listHeaderDropdownMuteBtn',
|
||||||
label: isMuting ? _(msg`Un-mute list`) : _(msg`Mute list`),
|
label: _(msg`Un-mute list`),
|
||||||
onPress: isMuting
|
onPress: onUnsubscribeMute,
|
||||||
? onUnsubscribeMute
|
|
||||||
: subscribeMutePromptControl.open,
|
|
||||||
icon: {
|
icon: {
|
||||||
ios: {
|
ios: {
|
||||||
name: isMuting ? 'eye' : 'eye.slash',
|
name: 'eye',
|
||||||
},
|
},
|
||||||
android: '',
|
android: '',
|
||||||
web: isMuting ? 'eye' : ['far', 'eye-slash'],
|
web: 'eye',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isMuting) {
|
if (isBlocking) {
|
||||||
items.push({
|
items.push({
|
||||||
testID: 'listHeaderDropdownBlockBtn',
|
testID: 'listHeaderDropdownBlockBtn',
|
||||||
label: isBlocking ? _(msg`Un-block list`) : _(msg`Block list`),
|
label: _(msg`Un-block list`),
|
||||||
onPress: isBlocking
|
onPress: onUnsubscribeBlock,
|
||||||
? onUnsubscribeBlock
|
|
||||||
: subscribeBlockPromptControl.open,
|
|
||||||
icon: {
|
icon: {
|
||||||
ios: {
|
ios: {
|
||||||
name: 'person.fill.xmark',
|
name: 'person.fill.xmark',
|
||||||
|
@ -508,9 +504,7 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) {
|
||||||
isBlocking,
|
isBlocking,
|
||||||
isMuting,
|
isMuting,
|
||||||
onUnsubscribeMute,
|
onUnsubscribeMute,
|
||||||
subscribeMutePromptControl.open,
|
|
||||||
onUnsubscribeBlock,
|
onUnsubscribeBlock,
|
||||||
subscribeBlockPromptControl.open,
|
|
||||||
])
|
])
|
||||||
|
|
||||||
const subscribeDropdownItems: DropdownItem[] = useMemo(() => {
|
const subscribeDropdownItems: DropdownItem[] = useMemo(() => {
|
||||||
|
|
Loading…
Reference in New Issue