From d6d2d35cf074b454edd6ffcae535cda32f1cc574 Mon Sep 17 00:00:00 2001 From: Danil Valov Date: Mon, 11 Nov 2024 14:06:45 +0300 Subject: [PATCH] Fix initial keyboard animation if `prevValue` is `0` --- src/GiftedChat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GiftedChat.tsx b/src/GiftedChat.tsx index 7739d462b..e0482dcdc 100644 --- a/src/GiftedChat.tsx +++ b/src/GiftedChat.tsx @@ -559,7 +559,7 @@ function GiftedChat ( useAnimatedReaction( () => keyboard.height.value, (value, prevValue) => { - if (prevValue && value !== prevValue) { + if (prevValue !== null && value !== prevValue) { const isKeyboardMovingUp = value > prevValue if (isKeyboardMovingUp !== trackingKeyboardMovement.value) { trackingKeyboardMovement.value = isKeyboardMovingUp