about summary refs log tree commit diff
path: root/src/lib/hooks
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2023-12-01 00:02:46 +0000
committerGitHub <noreply@github.com>2023-11-30 16:02:46 -0800
commit93755326985dddeb34d4fc0a4a9755d3a9860be1 (patch)
tree0315edd4c05110f1e04ac2a8fff396e334a6314e /src/lib/hooks
parentabe61b7517f07dfdb710a2ceb94676819f77a8d8 (diff)
downloadvoidsky-93755326985dddeb34d4fc0a4a9755d3a9860be1.tar.zst
Add enter/exit animations to modals on web (#2042)
* add reanimated layout animations to modals

* reorder imports

* pass context to scroll handler patches
Diffstat (limited to 'src/lib/hooks')
-rw-r--r--src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts b/src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts
index 131e7bdd7..98e05a8ce 100644
--- a/src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts
+++ b/src/lib/hooks/useAnimatedScrollHandler_FIXED.web.ts
@@ -11,31 +11,31 @@ export const useAnimatedScrollHandler: typeof useAnimatedScrollHandler_BUGGY = (
   })
   return useAnimatedScrollHandler_BUGGY(
     {
-      onBeginDrag(e) {
+      onBeginDrag(e, ctx) {
         if (typeof ref.current !== 'function' && ref.current.onBeginDrag) {
-          ref.current.onBeginDrag(e)
+          ref.current.onBeginDrag(e, ctx)
         }
       },
-      onEndDrag(e) {
+      onEndDrag(e, ctx) {
         if (typeof ref.current !== 'function' && ref.current.onEndDrag) {
-          ref.current.onEndDrag(e)
+          ref.current.onEndDrag(e, ctx)
         }
       },
-      onMomentumBegin(e) {
+      onMomentumBegin(e, ctx) {
         if (typeof ref.current !== 'function' && ref.current.onMomentumBegin) {
-          ref.current.onMomentumBegin(e)
+          ref.current.onMomentumBegin(e, ctx)
         }
       },
-      onMomentumEnd(e) {
+      onMomentumEnd(e, ctx) {
         if (typeof ref.current !== 'function' && ref.current.onMomentumEnd) {
-          ref.current.onMomentumEnd(e)
+          ref.current.onMomentumEnd(e, ctx)
         }
       },
-      onScroll(e) {
+      onScroll(e, ctx) {
         if (typeof ref.current === 'function') {
-          ref.current(e)
+          ref.current(e, ctx)
         } else if (ref.current.onScroll) {
-          ref.current.onScroll(e)
+          ref.current.onScroll(e, ctx)
         }
       },
     },