fix errors and revert loader

This commit is contained in:
Samuel Newman
2024-11-12 20:46:58 +00:00
parent 5697c9ff48
commit bc48045c1f
3 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -21,8 +21,9 @@ export function Loader(props: Props) {
})) }))
React.useEffect(() => { React.useEffect(() => {
rotation.set( rotation.value = withRepeat(
withRepeat(withTiming(360, {duration: 500, easing: Easing.linear}), -1), withTiming(360, {duration: 500, easing: Easing.linear}),
-1,
) )
}, [rotation]) }, [rotation])
@@ -217,7 +217,7 @@ export function MessagesList({
const onScroll = React.useCallback( const onScroll = React.useCallback(
(e: ReanimatedScrollEvent) => { (e: ReanimatedScrollEvent) => {
'worklet' 'worklet'
layoutHeight.value.set(e.layoutMeasurement.height) layoutHeight.set(e.layoutMeasurement.height)
const bottomOffset = e.contentOffset.y + e.layoutMeasurement.height const bottomOffset = e.contentOffset.y + e.layoutMeasurement.height
// Most apps have a little bit of space the user can scroll past while still automatically scrolling ot the bottom // Most apps have a little bit of space the user can scroll past while still automatically scrolling ot the bottom
+2 -2
View File
@@ -1288,9 +1288,9 @@ function useScrollTracker({
}) => { }) => {
'worklet' 'worklet'
if (typeof newContentHeight === 'number') if (typeof newContentHeight === 'number')
contentHeight.value.set(Math.floor(newContentHeight)) contentHeight.set(Math.floor(newContentHeight))
if (typeof newContentOffset === 'number') if (typeof newContentOffset === 'number')
contentOffset.value.set(Math.floor(newContentOffset)) contentOffset.set(Math.floor(newContentOffset))
if (typeof newScrollViewHeight === 'number') if (typeof newScrollViewHeight === 'number')
scrollViewHeight.set(Math.floor(newScrollViewHeight)) scrollViewHeight.set(Math.floor(newScrollViewHeight))
}, },