Clipclop tweaks (#3851)
* scroll on input resize
* add back the padding 🙊
* fix timestamps
This commit is contained in:
@@ -168,9 +168,11 @@ export function MessagesList() {
|
||||
[contentHeight.value, hasInitiallyScrolled, isAtBottom],
|
||||
)
|
||||
|
||||
const onInputFocus = React.useCallback(() => {
|
||||
flatListRef.current?.scrollToEnd({animated: true})
|
||||
}, [flatListRef])
|
||||
const scrollToEnd = React.useCallback(() => {
|
||||
requestAnimationFrame(() =>
|
||||
flatListRef.current?.scrollToEnd({animated: true}),
|
||||
)
|
||||
}, [])
|
||||
|
||||
const {bottom: bottomInset} = useSafeAreaInsets()
|
||||
const {gtMobile} = useBreakpoints()
|
||||
@@ -200,6 +202,7 @@ export function MessagesList() {
|
||||
maintainVisibleContentPosition={{
|
||||
minIndexForVisible: 1,
|
||||
}}
|
||||
contentContainerStyle={{paddingHorizontal: 10}}
|
||||
removeClippedSubviews={false}
|
||||
onContentSizeChange={onContentSizeChange}
|
||||
onStartReached={onStartReached}
|
||||
@@ -215,10 +218,7 @@ export function MessagesList() {
|
||||
/>
|
||||
</ScrollProvider>
|
||||
</View>
|
||||
<MessageInput
|
||||
onSendMessage={onSendMessage}
|
||||
onFocus={isWeb ? onInputFocus : undefined}
|
||||
/>
|
||||
<MessageInput onSendMessage={onSendMessage} scrollToEnd={scrollToEnd} />
|
||||
</KeyboardAvoidingView>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user