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(() => {
rotation.set(
withRepeat(withTiming(360, {duration: 500, easing: Easing.linear}), -1),
rotation.value = withRepeat(
withTiming(360, {duration: 500, easing: Easing.linear}),
-1,
)
}, [rotation])
@@ -217,7 +217,7 @@ export function MessagesList({
const onScroll = React.useCallback(
(e: ReanimatedScrollEvent) => {
'worklet'
layoutHeight.value.set(e.layoutMeasurement.height)
layoutHeight.set(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
+2 -2
View File
@@ -1288,9 +1288,9 @@ function useScrollTracker({
}) => {
'worklet'
if (typeof newContentHeight === 'number')
contentHeight.value.set(Math.floor(newContentHeight))
contentHeight.set(Math.floor(newContentHeight))
if (typeof newContentOffset === 'number')
contentOffset.value.set(Math.floor(newContentOffset))
contentOffset.set(Math.floor(newContentOffset))
if (typeof newScrollViewHeight === 'number')
scrollViewHeight.set(Math.floor(newScrollViewHeight))
},