feat(mobile): add scroll-to-end button #5915
ClosedKapish14(GitHub profile, opens in a new tab)wants to merge 2 commits into
main fromrefs/pull/5915/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
- apps/mobile/src/features/threads/ThreadDetailScreen.tsx line 413Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -390,3 +409,11 @@390409 list's bottom inset, so any padding above the pill/composer391410 pushes the resting content floor up by the same amount. */}392411 <View ref={composerOverlayRef} onLayout={onComposerLayout} className="w-full">412+ {showScrollToEndButton ? (413+ <Animated.View414+ pointerEvents="box-none"415+ className="absolute -top-28 left-0 right-0 z-20 items-center"416+ entering={FadeInDown.duration(160)}417+ exiting={FadeOut.duration(100)}418+ >419+ <ControlPill
- apps/mobile/src/features/threads/ThreadDetailScreen.tsx line 246OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -241,3 +243,4 @@241243 useEffect(() => {242244 setAnchorMessageId(null);243245 lastScrolledAnchorMessageIdRef.current = null;246+ setEndFollowEnabled(true);apps/mobile/src/features/threads/ThreadDetailScreen.tsx line 323OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -312,3 +315,9 @@312315 composerEditorRef.current?.blur();313316 }, []);314317318+ const handleScrollToEnd = useCallback(() => {319+ void Haptics.selectionAsync();320+ void scrollMessageToEnd({ animated: true, closeKeyboard: false }).catch(() => {321+ freeze.set(false);322+ });323+ }, [freeze, scrollMessageToEnd]);
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/mobile/src/features/threads/ThreadDetailScreen.tsx line 318Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -312,3 +322,17 @@312322 composerEditorRef.current?.blur();313323 }, []);314324325+ const handleEndFollowEnabledChange = useCallback(326+ (enabled: boolean) => {327+ setEndFollowState((current) =>328+ reduceThreadEndFollowState(current, {329+ type: "observed",330+ threadKey: selectedThreadKey,331+ enabled,332+ }),333+ );334+ },335+ [selectedThreadKey],336+ );337+338+ const handleScrollToEnd = useCallback(() => {
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Kapish14(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
adeb2ca4-7e4b-4495-8b99-6e0b877b18ddYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share