Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): show the composer draft after answering a question #14058

Closedmacodev00(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/14058/headopened View on GitHub

Showing 5 changed files with 105 additions and 14 deletions (loading 2).

x
0 of 5 viewed, 5 left
25 additions and 2 deletionsapps/mobile/src/features/threads/ThreadComposer.tsxModified
View file
@@ -69,6 +69,7 @@
import { VideoPreviewModal, type VideoPreviewSource } from "../../components/VideoPreviewModal";
import { GlassSurface } from "../../components/GlassSurface";
import { ComposerEditor, type ComposerEditorHandle } from "../../components/ComposerEditor";
+import { useComposerDraftRebind } from "../../native/useComposerDraftRebind";
import { fileRoutePathSegments } from "../files/filePath";
import {
ComposerActionButton,
@@ -155,6 +156,12 @@
readonly onExpandedChange?: (expanded: boolean) => void;
/** Fires on editor focus/blur; hosts use it to vet stale keyboard state. */
readonly onEditorFocusChange?: (focused: boolean) => void;
+ /**
+ * True while an ask-question card (or a failed-creation card) owns the
+ * composer slot. Flipping this back to false remounts the editor so the
+ * stored draft is shown again.
+ */
+ readonly composerConcealed: boolean;
​
/**
@@ -203,6 +210,10 @@
​
const AnimatedGlassSurface = Animated.createAnimatedComponent(GlassSurface);
​
+/**
+ * Glass shell around the composer. It morphs between the compact pill and the
+ * expanded card, and keeps that shape in sync on the glass and the content.