Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Refresh on scroll-to-top by active section press (#1807)

authored by

Paul Frazee and committed by
GitHub
4de852de 445f9768

+4 -13
+2 -6
src/view/screens/ProfileFeed.tsx
··· 393 393 394 394 const onScrollToTop = useCallback(() => { 395 395 scrollElRef.current?.scrollToOffset({offset: -headerHeight}) 396 - }, [scrollElRef, headerHeight]) 397 - 398 - const onPressLoadLatest = React.useCallback(() => { 399 - onScrollToTop() 400 396 feed.refresh() 401 - }, [feed, onScrollToTop]) 397 + }, [feed, scrollElRef, headerHeight]) 402 398 403 399 React.useImperativeHandle(ref, () => ({ 404 400 scrollToTop: onScrollToTop, ··· 420 416 /> 421 417 {(isScrolledDown || hasNew) && ( 422 418 <LoadLatestBtn 423 - onPress={onPressLoadLatest} 419 + onPress={onScrollToTop} 424 420 label="Load new posts" 425 421 showIndicator={hasNew} 426 422 />
+2 -7
src/view/screens/ProfileList.tsx
··· 558 558 559 559 const onScrollToTop = useCallback(() => { 560 560 scrollElRef.current?.scrollToOffset({offset: -headerHeight}) 561 - }, [scrollElRef, headerHeight]) 562 - 563 - const onPressLoadLatest = React.useCallback(() => { 564 - onScrollToTop() 565 561 feed.refresh() 566 - }, [feed, onScrollToTop]) 567 - 562 + }, [feed, scrollElRef, headerHeight]) 568 563 React.useImperativeHandle(ref, () => ({ 569 564 scrollToTop: onScrollToTop, 570 565 })) ··· 586 581 /> 587 582 {(isScrolledDown || hasNew) && ( 588 583 <LoadLatestBtn 589 - onPress={onPressLoadLatest} 584 + onPress={onScrollToTop} 590 585 label="Load new posts" 591 586 showIndicator={hasNew} 592 587 />