[Clipclops] adjust scroll position, keyboard color (#3771)

* use the correct keyboard appearance based on theme

* i guess the min index should be 1
zio/stable
Hailey 2024-04-30 11:33:41 -07:00 committed by GitHub
parent 611ff0c7e4
commit 268e30d21a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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"
/>