diff options
author | Eric Bailey <git@esb.lol> | 2024-05-02 10:17:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 10:17:17 -0500 |
commit | c2062753c5e687dca7a7dea6aa874af13c9567c3 (patch) | |
tree | 08752bb97aa016989ec561d3e8aff3c357655991 /src | |
parent | cc9727a844979646b17a806616cbfb27b9fbfab8 (diff) | |
download | voidsky-c2062753c5e687dca7a7dea6aa874af13c9567c3.tar.zst |
Allow unmuting and unblocking of curate lists, but not the opposite (#3817)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/screens/ProfileList.tsx | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/view/screens/ProfileList.tsx b/src/view/screens/ProfileList.tsx index 1d93a9fd7..2902ccf5e 100644 --- a/src/view/screens/ProfileList.tsx +++ b/src/view/screens/ProfileList.tsx @@ -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(() => { |