From 5343910570e91743ed385305cc4800695736425a Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Sat, 18 May 2024 12:29:23 -0700
Subject: [🐴] 🤞 This should be the final message list change - Use
 `dispatchCommand` so we don't need to know the content height (#4090)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* handle keyboard scroll more elegantly

simplify

missing `runOnUI`

better naming to avoid confusion

nit

remove unused function

use `dispatchCommand` in `onContentSizeChanged` as well

use `dispatchCommand` so we don't need to know the content height

remove `isMomentumScrolling`

* better timing

* nit

* another nit

* handle message input resizes better too

* account for other size changes like emoji keyboard opening

* one last nit

* just adding comments

* account for dragging

* make it easier to read

* add a comment

* 🤦‍♀️

* remove a little bit of that padding at the top
---
 src/screens/Messages/Conversation/MessageInput.tsx | 8 ++------
 1 file changed, 2 insertions(+), 6 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 48c3aeb37..9deecfd49 100644
--- a/src/screens/Messages/Conversation/MessageInput.tsx
+++ b/src/screens/Messages/Conversation/MessageInput.tsx
@@ -27,10 +27,8 @@ import {PaperPlane_Stroke2_Corner0_Rounded as PaperPlane} from '#/components/ico
 
 export function MessageInput({
   onSendMessage,
-  scrollToEnd,
 }: {
   onSendMessage: (message: string) => void
-  scrollToEnd: () => void
 }) {
   const {_} = useLingui()
   const t = useTheme()
@@ -75,14 +73,12 @@ export function MessageInput({
 
       setMaxHeight(max)
       setIsInputScrollable(availableSpace < 30)
-
-      scrollToEnd()
     },
-    [scrollToEnd, topInset],
+    [topInset],
   )
 
   return (
-    <View style={[a.px_md, a.py_sm]}>
+    <View style={[a.px_md, a.pb_sm, a.pt_xs]}>
       <View
         style={[
           a.w_full,
-- 
cgit 1.4.1

