From b5406347a5ea1226e2d6b082793e4ab81694f014 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 5 Feb 2025 17:06:30 -0600 Subject: [PATCH] Handle edited state --- package.json | 1 + .../dialogs/PostInteractionSettingsDialog.tsx | 16 ++++++ .../ModerationInteractionSettings/index.tsx | 51 +++++++++++-------- src/view/com/composer/Composer.tsx | 13 ++--- 4 files changed, 50 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index b4883a21a0..189c9392e1 100644 --- a/package.json +++ b/package.json @@ -148,6 +148,7 @@ "expo-updates": "~0.26.10", "expo-video": "^2.0.5", "expo-web-browser": "~14.0.1", + "fast-deep-equal": "^3.1.3", "fast-text-encoding": "^1.0.6", "history": "^5.3.0", "hls.js": "^1.5.11", diff --git a/src/components/dialogs/PostInteractionSettingsDialog.tsx b/src/components/dialogs/PostInteractionSettingsDialog.tsx index 5b15f06559..3298301c79 100644 --- a/src/components/dialogs/PostInteractionSettingsDialog.tsx +++ b/src/components/dialogs/PostInteractionSettingsDialog.tsx @@ -30,16 +30,19 @@ import { import {useAgent, useSession} from '#/state/session' import * as Toast from '#/view/com/util/Toast' import {atoms as a, useTheme} from '#/alf' +import {Admonition} from '#/components/Admonition' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' import {Divider} from '#/components/Divider' import * as Toggle from '#/components/forms/Toggle' import {Check_Stroke2_Corner0_Rounded as Check} from '#/components/icons/Check' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' +import {InlineLinkText} from '#/components/Link' import {Loader} from '#/components/Loader' import {Text} from '#/components/Typography' export type PostInteractionSettingsFormProps = { + canSave?: boolean onSave: () => void isSaving?: boolean @@ -59,6 +62,7 @@ export function PostInteractionSettingsControlledDialog({ control: Dialog.DialogControlProps }) { const {_} = useLingui() + return ( @@ -68,6 +72,16 @@ export function PostInteractionSettingsControlledDialog({
+ + + You can configure defaults for these settings from within your{' '} + + moderation settings screen. + + + @@ -244,6 +258,7 @@ export function PostInteractionSettingsDialogControlledInner( } export function PostInteractionSettingsForm({ + canSave = true, onSave, isSaving, postgate, @@ -446,6 +461,7 @@ export function PostInteractionSettingsForm({