Skip to content

Commit 05cd55d

Browse files
authored
fix(mobile): center Android composer text and pad wrapped drafts (#23829)
1 parent 50e151c commit 05cd55d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/mobile/src/features/threads/ThreadComposer.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ export function useCompactComposerEditor(text: ScaledTextRole, value: string) {
147147
const rowWidth = useSharedValue(0);
148148
const editorX = useSharedValue(0);
149149
const editorWidth = useSharedValue(0);
150-
const inset = Platform.OS === "android" ? 0 : collapsedEditorInset(text);
150+
const inset =
151+
Platform.OS === "android" ? COLLAPSED_EDITOR_DEFAULT_INSET : collapsedEditorInset(text);
151152
const minimum = Math.max(INLINE_EDITOR_HEIGHT, Math.ceil(text.lineHeight) + 2 * inset);
152153
const height = Math.max(
153154
minimum,
@@ -216,7 +217,7 @@ export function useCompactComposerEditor(text: ScaledTextRole, value: string) {
216217
}
217218
},
218219
editorProps: {
219-
singleLineCentered: false,
220+
singleLineCentered: !isExpanded,
220221
scrollEnabled: Platform.OS === "android" || contentHeight >= text.lineHeight * 4,
221222
contentInsetVertical: inset,
222223
onContentSizeChange: (size: { width: number; height: number }) => {

0 commit comments

Comments
 (0)