about summary refs log tree commit diff
path: root/src/lib/api/index.ts
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-10-02 00:08:46 +0900
committerGitHub <noreply@github.com>2024-10-02 00:08:46 +0900
commitd2fd5589dc93831cda625ad91083b8b051878d39 (patch)
tree0bb56467eece49028d70ebe5402f4792630d433a /src/lib/api/index.ts
parenta7ee561e4074f839f340c77a1f21c8f5657865c7 (diff)
downloadvoidsky-d2fd5589dc93831cda625ad91083b8b051878d39.tar.zst
Introduce a composer reducer and move image state there (#5547)
* Add composer reducer

* Support adding images

Co-authored-by: Mary <git@mary.my.id>

* Support updating and deleting images

Co-authored-by: Mary <git@mary.my.id>

* Derive images state from composer state

Co-authored-by: Mary <git@mary.my.id>

---------

Co-authored-by: Mary <git@mary.my.id>
Diffstat (limited to 'src/lib/api/index.ts')
-rw-r--r--src/lib/api/index.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/api/index.ts b/src/lib/api/index.ts
index 08d4cb962..51bf51fff 100644
--- a/src/lib/api/index.ts
+++ b/src/lib/api/index.ts
@@ -24,6 +24,7 @@ import {
   threadgateAllowUISettingToAllowRecordValue,
   writeThreadgateRecord,
 } from '#/state/queries/threadgate'
+import {ComposerState} from '#/view/com/composer/state'
 import {LinkMeta} from '../link-meta/link-meta'
 import {uploadBlob} from './upload-blob'
 
@@ -38,6 +39,7 @@ export interface ExternalEmbedDraft {
 }
 
 interface PostOpts {
+  composerState: ComposerState // TODO: Not used yet.
   rawText: string
   replyTo?: string
   quote?: {