diff --git a/src/components/dialogs/PostInteractionSettingsDialog.tsx b/src/components/dialogs/PostInteractionSettingsDialog.tsx
index 162330e7d1..fba23db33f 100644
--- a/src/components/dialogs/PostInteractionSettingsDialog.tsx
+++ b/src/components/dialogs/PostInteractionSettingsDialog.tsx
@@ -16,10 +16,11 @@ import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import {Divider} from '#/components/Divider'
import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check'
+import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo'
import {Loader} from '#/components/Loader'
import {Text} from '#/components/Typography'
-type Props = {
+export type Props = {
onSave: () => void
isSaving: boolean
@@ -28,6 +29,8 @@ type Props = {
threadgateAllowUISettings: ThreadgateAllowUISetting[]
onChangeThreadgateAllowUISettings: (v: ThreadgateAllowUISetting[]) => void
+
+ replySettingsDisabled?: boolean
}
export function PostInteractionSettingsDialog({
@@ -36,21 +39,28 @@ export function PostInteractionSettingsDialog({
}: Props & {
control: Dialog.DialogControlProps
}) {
+ const {_} = useLingui()
return (
-
+
+
+
+
)
}
-function DialogContent({
+export function PostInteractionSettingsDialogInner({
onSave,
isSaving,
postgate,
onChangePostgate,
threadgateAllowUISettings,
onChangeThreadgateAllowUISettings,
+ replySettingsDisabled,
}: Props) {
const t = useTheme()
const {_} = useLingui()
@@ -91,9 +101,7 @@ function DialogContent({
)
return (
-
+
Post interaction settings
@@ -143,7 +151,31 @@ function DialogContent({
-
+ {replySettingsDisabled && (
+
+
+
+ Reply settings are inherited from the root post
+
+
+ )}
+
+
Reply settings
@@ -162,6 +194,7 @@ function DialogContent({
onChangeThreadgateAllowUISettings([{type: 'everybody'}])
}
style={{flex: 1}}
+ disabled={replySettingsDisabled}
/>
@@ -188,6 +222,7 @@ function DialogContent({
)
}
onPress={() => onPressAudience({type: 'mention'})}
+ disabled={replySettingsDisabled}
/>
onPressAudience({type: 'following'})}
+ disabled={replySettingsDisabled}
/>
{lists && lists.length > 0
? lists.map(list => (
@@ -211,6 +247,7 @@ function DialogContent({
onPress={() =>
onPressAudience({type: 'list', list: list.uri})
}
+ disabled={replySettingsDisabled}
/>
))
: // No loading states to avoid jumps for the common case (no lists)
@@ -233,9 +270,7 @@ function DialogContent({
{_(msg`Save`)}
{isSaving && }
-
-
-
+
)
}
@@ -244,15 +279,18 @@ function Selectable({
isSelected,
onPress,
style,
+ disabled,
}: {
label: string
isSelected: boolean
onPress: () => void
style?: StyleProp
+ disabled?: boolean
}) {
const t = useTheme()
return (