Add new followerRule to threadgate settings
This commit is contained in:
+1
-1
@@ -54,7 +54,7 @@
|
||||
"icons:optimize": "svgo -f ./assets/icons"
|
||||
},
|
||||
"dependencies": {
|
||||
"@atproto/api": "^0.13.33",
|
||||
"@atproto/api": "^0.13.34",
|
||||
"@bitdrift/react-native": "^0.6.2",
|
||||
"@braintree/sanitize-url": "^6.0.2",
|
||||
"@discord/bottom-sheet": "bluesky-social/react-native-bottom-sheet",
|
||||
|
||||
@@ -438,6 +438,16 @@ export function PostInteractionSettingsForm({
|
||||
onPress={() => onPressAudience({type: 'following'})}
|
||||
disabled={replySettingsDisabled}
|
||||
/>
|
||||
<Selectable
|
||||
label={_(msg`Your followers`)}
|
||||
isSelected={
|
||||
!!threadgateAllowUISettings.find(
|
||||
v => v.type === 'followers',
|
||||
)
|
||||
}
|
||||
onPress={() => onPressAudience({type: 'followers'})}
|
||||
disabled={replySettingsDisabled}
|
||||
/>
|
||||
{lists && lists.length > 0
|
||||
? lists.map(list => (
|
||||
<Selectable
|
||||
|
||||
@@ -3,4 +3,5 @@ export type ThreadgateAllowUISetting =
|
||||
| {type: 'nobody'}
|
||||
| {type: 'mention'}
|
||||
| {type: 'following'}
|
||||
| {type: 'followers'}
|
||||
| {type: 'list'; list: unknown}
|
||||
|
||||
@@ -43,6 +43,8 @@ export function threadgateRecordToAllowUISetting(
|
||||
setting = {type: 'mention'}
|
||||
} else if (allow.$type === 'app.bsky.feed.threadgate#followingRule') {
|
||||
setting = {type: 'following'}
|
||||
} else if (allow.$type === 'app.bsky.feed.threadgate#followerRule') {
|
||||
setting = {type: 'followers'}
|
||||
} else if (allow.$type === 'app.bsky.feed.threadgate#listRule') {
|
||||
setting = {type: 'list', list: allow.list}
|
||||
}
|
||||
@@ -79,6 +81,8 @@ export function threadgateAllowUISettingToAllowRecordValue(
|
||||
allow.push({$type: 'app.bsky.feed.threadgate#mentionRule'})
|
||||
} else if (rule.type === 'following') {
|
||||
allow.push({$type: 'app.bsky.feed.threadgate#followingRule'})
|
||||
} else if (rule.type === 'followers') {
|
||||
allow.push({$type: 'app.bsky.feed.threadgate#followerRule'})
|
||||
} else if (rule.type === 'list') {
|
||||
allow.push({
|
||||
$type: 'app.bsky.feed.threadgate#listRule',
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
tlds "^1.234.0"
|
||||
zod "^3.23.8"
|
||||
|
||||
"@atproto/api@^0.13.33":
|
||||
version "0.13.33"
|
||||
resolved "https://registry.yarnpkg.com/@atproto/api/-/api-0.13.33.tgz#01d31a1cfd1be311e11324b810b8a83fe4cbf9b0"
|
||||
integrity sha512-d8AOvtxo2J2zrmcakJTUtLdz2ns+pAqywNXhPxPzHrHcw79D6MKBLHR0vr8oxkGwhDBQTsHiQWTk4gSo8PF7YA==
|
||||
"@atproto/api@^0.13.34":
|
||||
version "0.13.34"
|
||||
resolved "https://registry.yarnpkg.com/@atproto/api/-/api-0.13.34.tgz#8bdb5795f65dc8c78cb631cce4e7217ec7dcdb14"
|
||||
integrity sha512-GQT47fkeozMjWyERaMflIphk+t5g1oMN7IuHaNskS41PFdmDhtEvMt42/gEPyy+anY/iCaAsl+uo89fOPHQXhQ==
|
||||
dependencies:
|
||||
"@atproto/common-web" "^0.4.0"
|
||||
"@atproto/lexicon" "^0.4.6"
|
||||
|
||||
Reference in New Issue
Block a user