diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-12-07 13:41:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 13:41:02 -0800 |
commit | 940fc0ea5c3aefb49f39d8de9398a306882ed567 (patch) | |
tree | 98b21e161808c011a84b858324778119aca37941 /src/view/screens/Notifications.tsx | |
parent | f115969f50b7f699696e71faabb4ae307177572e (diff) | |
download | voidsky-940fc0ea5c3aefb49f39d8de9398a306882ed567.tar.zst |
Disable animation on scrollToTop for web (#2137)
Diffstat (limited to 'src/view/screens/Notifications.tsx')
-rw-r--r-- | src/view/screens/Notifications.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/view/screens/Notifications.tsx b/src/view/screens/Notifications.tsx index 3ce1128a6..0af6484f3 100644 --- a/src/view/screens/Notifications.tsx +++ b/src/view/screens/Notifications.tsx @@ -26,6 +26,7 @@ import { import {RQKEY as NOTIFS_RQKEY} from '#/state/queries/notifications/feed' import {listenSoftReset, emitSoftReset} from '#/state/events' import {truncateAndInvalidate} from '#/state/queries/util' +import {isNative} from '#/platform/detection' type Props = NativeStackScreenProps< NotificationsTabNavigatorParams, @@ -47,7 +48,7 @@ export function NotificationsScreen({}: Props) { // event handlers // = const scrollToTop = React.useCallback(() => { - scrollElRef.current?.scrollToOffset({offset: 0}) + scrollElRef.current?.scrollToOffset({animated: isNative, offset: 0}) resetMainScroll() }, [scrollElRef, resetMainScroll]) |