about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJoão Ferreiro <ferreiro@pinkroom.dev>2022-11-29 18:32:07 +0000
committerJoão Ferreiro <ferreiro@pinkroom.dev>2022-11-29 18:32:07 +0000
commit90942ae1466333bf8fcdffeaf5432aa65fbb2747 (patch)
treea535936842efa1921c703d5474c00f644946a79b /src
parent6ba5d15cb68b4edd657667a9d487eeceb05891e5 (diff)
downloadvoidsky-90942ae1466333bf8fcdffeaf5432aa65fbb2747.tar.zst
moving placeholder condition
Diffstat (limited to 'src')
-rw-r--r--src/view/com/composer/ComposePost.tsx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/view/com/composer/ComposePost.tsx b/src/view/com/composer/ComposePost.tsx
index 7b41f95fc..b43f4ab9e 100644
--- a/src/view/com/composer/ComposePost.tsx
+++ b/src/view/com/composer/ComposePost.tsx
@@ -128,10 +128,16 @@ export const ComposePost = observer(function ComposePost({
 
   const canPost = text.length <= MAX_TEXT_LENGTH
   const progressColor = text.length > DANGER_TEXT_LENGTH ? '#e60000' : undefined
+
   const selectTextInputLayout =
     selectedPhotos.length !== 0
       ? styles.textInputLayoutWithPhoto
       : styles.textInputLayoutWithoutPhoto
+  const selectTextInputPlaceholder = replyTo
+    ? 'Write your reply'
+    : selectedPhotos.length !== 0
+    ? 'Write a comment'
+    : "What's up?"
 
   const textDecorated = useMemo(() => {
     let i = 0
@@ -220,13 +226,7 @@ export const ComposePost = observer(function ComposePost({
             multiline
             scrollEnabled
             onChangeText={(text: string) => onChangeText(text)}
-            placeholder={
-              replyTo
-                ? 'Write your reply'
-                : selectedPhotos.length !== 0
-                ? 'Write a comment'
-                : "What's up?"
-            }
+            placeholder={selectTextInputPlaceholder}
             style={styles.textInput}>
             {textDecorated}
           </TextInput>