diff --git a/src/js/worklets/shell/floating_screen.js b/src/js/worklets/shell/floating_screen.js index d3b914a9f3..30bd472f4f 100644 --- a/src/js/worklets/shell/floating_screen.js +++ b/src/js/worklets/shell/floating_screen.js @@ -121,7 +121,14 @@ export function screenGestureOnEnd(data) { return function (event) { 'worklet'; - const { screenLeft, screenState, screenWidth, leftVelocity, rightVelocity, screenClosedCallback } = data; + const { + 'screen-left': screenLeft, + 'screen-state': screenState, + 'screen-width': screenWidth, + 'left-velocity': leftVelocity, + 'right-velocity': rightVelocity, + 'screen-closed-callback': screenClosedCallback, + } = data; const absoluteX = event.absoluteX ?? 0; const velocityX = event.velocityX ?? 0; const closeScreen = velocityX > rightVelocity || (velocityX > leftVelocity && absoluteX >= screenWidth / 2); diff --git a/src/status_im2/contexts/shell/jump_to/gesture.cljs b/src/status_im2/contexts/shell/jump_to/gesture.cljs index 180df942cd..8d8154f19d 100644 --- a/src/status_im2/contexts/shell/jump_to/gesture.cljs +++ b/src/status_im2/contexts/shell/jump_to/gesture.cljs @@ -12,6 +12,9 @@ #(rf/dispatch [:shell/navigate-back constants/close-screen-without-animation]) (or animation-time constants/shell-animation-time))) +;; Make sure issue is fixed before enabling gesture for floating screens +;; Issue: https://github.com/status-im/status-mobile/pull/16438#issuecomment-1621397789 +;; More Info: https://github.com/status-im/status-mobile/pull/16438#issuecomment-1622589147 (defn floating-screen-gesture [screen-id] (let [{:keys [screen-left screen-state]} (get @state/shared-values-atom screen-id) diff --git a/src/utils/worklets/shell.cljs b/src/utils/worklets/shell.cljs index 9c122b1d9a..05107140c7 100644 --- a/src/utils/worklets/shell.cljs +++ b/src/utils/worklets/shell.cljs @@ -1,6 +1,4 @@ -(ns utils.worklets.shell - (:require [utils.collection] - [camel-snake-kebab.core :as csk])) +(ns utils.worklets.shell) (def bottom-tabs-worklets (js/require "../src/js/worklets/shell/bottom_tabs.js")) (def home-stack-worklets (js/require "../src/js/worklets/shell/home_stack.js")) @@ -96,6 +94,4 @@ (defn floating-screen-gesture-on-end [data] - (.screenGestureOnEnd - ^js floating-screen-worklets - (clj->js (utils.collection/map-keys csk/->camelCaseString data)))) + (.screenGestureOnEnd ^js floating-screen-worklets (clj->js data)))