diff options
author | Minseo Lee <itoupluk427@gmail.com> | 2024-02-28 13:03:55 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 13:03:55 +0900 |
commit | 3767e763906088d410da9ca99532c093368ca196 (patch) | |
tree | 533df6df19320459b69c54c7b26fac5b59279e5e /src/view/com/composer/Composer.tsx | |
parent | 41e69651f97cc95d42ff4ae247706604faca51ae (diff) | |
parent | c4d30a0b7fb3e73b208a01d0f62130535d549392 (diff) | |
download | voidsky-3767e763906088d410da9ca99532c093368ca196.tar.zst |
Merge branch 'bluesky-social:main' into patch-3
Diffstat (limited to 'src/view/com/composer/Composer.tsx')
-rw-r--r-- | src/view/com/composer/Composer.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index 1ed6b98a5..2855d4232 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -71,6 +71,8 @@ export const ComposePost = observer(function ComposePost({ quote: initQuote, mention: initMention, openPicker, + text: initText, + imageUris: initImageUris, }: Props) { const {currentAccount} = useSession() const {data: currentProfile} = useProfileQuery({did: currentAccount!.did}) @@ -91,7 +93,9 @@ export const ComposePost = observer(function ComposePost({ const [error, setError] = useState('') const [richtext, setRichText] = useState( new RichText({ - text: initMention + text: initText + ? initText + : initMention ? insertMentionAt( `@${initMention}`, initMention.length + 1, @@ -110,7 +114,10 @@ export const ComposePost = observer(function ComposePost({ const [labels, setLabels] = useState<string[]>([]) const [threadgate, setThreadgate] = useState<ThreadgateSetting[]>([]) const [suggestedLinks, setSuggestedLinks] = useState<Set<string>>(new Set()) - const gallery = useMemo(() => new GalleryModel(), []) + const gallery = useMemo( + () => new GalleryModel(initImageUris), + [initImageUris], + ) const onClose = useCallback(() => { closeComposer() }, [closeComposer]) |