about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-04-30 11:33:41 -0700
committerGitHub <noreply@github.com>2024-04-30 11:33:41 -0700
commit268e30d21af3c71ad3d3a71590ef681a21f69438 (patch)
tree83fa3d6b2a24b52268f843d090d6da304e7b18ca
parent611ff0c7e4e0233dc69b4bd0f8d2bb59de685ace (diff)
downloadvoidsky-268e30d21af3c71ad3d3a71590ef681a21f69438.tar.zst
[Clipclops] adjust scroll position, keyboard color (#3771)
* use the correct keyboard appearance based on theme

* i guess the min index should be 1
-rw-r--r--src/screens/Messages/Conversation/MessageInput.tsx1
-rw-r--r--src/screens/Messages/Conversation/MessagesList.tsx6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/screens/Messages/Conversation/MessageInput.tsx b/src/screens/Messages/Conversation/MessageInput.tsx
index 3a3ce38f6..1a63b1b5b 100644
--- a/src/screens/Messages/Conversation/MessageInput.tsx
+++ b/src/screens/Messages/Conversation/MessageInput.tsx
@@ -47,6 +47,7 @@ export function MessageInput({
         onFocus={onFocus}
         onBlur={onBlur}
         placeholderTextColor={t.palette.contrast_500}
+        keyboardAppearance={t.name === 'light' ? 'light' : 'dark'}
         ref={inputRef}
       />
       <Pressable
diff --git a/src/screens/Messages/Conversation/MessagesList.tsx b/src/screens/Messages/Conversation/MessagesList.tsx
index fe353fa34..25aaf28c4 100644
--- a/src/screens/Messages/Conversation/MessagesList.tsx
+++ b/src/screens/Messages/Conversation/MessagesList.tsx
@@ -172,23 +172,23 @@ export function MessagesList({chatId}: {chatId: string}) {
         keyExtractor={item => item.message.id}
         renderItem={renderItem}
         contentContainerStyle={{paddingHorizontal: 10}}
+        inverted={true}
         // In the future, we might want to adjust this value. Not very concerning right now as long as we are only
         // dealing with text. But whenever we have images or other media and things are taller, we will want to lower
         // this...probably.
         initialNumToRender={20}
         // Same with the max to render per batch. Let's be safe for now though.
         maxToRenderPerBatch={25}
-        inverted={true}
+        removeClippedSubviews={true}
         onEndReached={onEndReached}
         onScrollToIndexFailed={onScrollToEndFailed}
         onContentSizeChange={onContentSizeChange}
         onViewableItemsChanged={onViewableItemsChanged}
         viewabilityConfig={viewabilityConfig}
         maintainVisibleContentPosition={{
-          minIndexForVisible: 0,
+          minIndexForVisible: 1,
         }}
         ListFooterComponent={<MaybeLoader isLoading={false} />}
-        removeClippedSubviews={true}
         ref={flatListRef}
         keyboardDismissMode="none"
       />