From feff55a14a050665e6cc8bb7511425986ef4768a Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Fri, 3 May 2024 15:08:59 -0700
Subject: Clipclop tweaks (#3851)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* scroll on input resize

* add back the padding 🙊

* fix timestamps
---
 src/screens/Messages/Conversation/MessageInput.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/screens/Messages/Conversation/MessageInput.tsx')

diff --git a/src/screens/Messages/Conversation/MessageInput.tsx b/src/screens/Messages/Conversation/MessageInput.tsx
index e94a295eb..d93607530 100644
--- a/src/screens/Messages/Conversation/MessageInput.tsx
+++ b/src/screens/Messages/Conversation/MessageInput.tsx
@@ -18,10 +18,10 @@ import {PaperPlane_Stroke2_Corner0_Rounded as PaperPlane} from '#/components/ico
 
 export function MessageInput({
   onSendMessage,
-  onFocus,
+  scrollToEnd,
 }: {
   onSendMessage: (message: string) => void
-  onFocus?: () => void
+  scrollToEnd: () => void
 }) {
   const {_} = useLingui()
   const t = useTheme()
@@ -54,8 +54,10 @@ export function MessageInput({
 
       setMaxHeight(max)
       setIsInputScrollable(availableSpace < 30)
+
+      scrollToEnd()
     },
-    [topInset],
+    [scrollToEnd, topInset],
   )
 
   return (
@@ -82,7 +84,7 @@ export function MessageInput({
           keyboardAppearance={t.name === 'light' ? 'light' : 'dark'}
           scrollEnabled={isInputScrollable}
           blurOnSubmit={false}
-          onFocus={onFocus}
+          onFocus={scrollToEnd}
           onContentSizeChange={onInputLayout}
           ref={inputRef}
         />
-- 
cgit 1.4.1

