Clipclop tweaks (#3851)
* scroll on input resize
* add back the padding 🙊
* fix timestamps
This commit is contained in:
parent
876816675e
commit
feff55a14a
5 changed files with 20 additions and 13 deletions
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue