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