Skip to content

Commit e153010

Browse files
committed
Remove use of camel-snake-kebab from shell worklet
1 parent 442600b commit e153010

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

Diff for: src/js/worklets/shell/floating_screen.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,14 @@ export function screenGestureOnEnd(data) {
121121
return function (event) {
122122
'worklet';
123123

124-
const { screenLeft, screenState, screenWidth, leftVelocity, rightVelocity, screenClosedCallback } = data;
124+
const {
125+
'screen-left': screenLeft,
126+
'screen-state': screenState,
127+
'screen-width': screenWidth,
128+
'left-velocity': leftVelocity,
129+
'right-velocity': rightVelocity,
130+
'screen-closed-callback': screenClosedCallback,
131+
} = data;
125132
const absoluteX = event.absoluteX ?? 0;
126133
const velocityX = event.velocityX ?? 0;
127134
const closeScreen = velocityX > rightVelocity || (velocityX > leftVelocity && absoluteX >= screenWidth / 2);

Diff for: src/status_im2/contexts/shell/jump_to/gesture.cljs

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#(rf/dispatch [:shell/navigate-back constants/close-screen-without-animation])
1313
(or animation-time constants/shell-animation-time)))
1414

15+
;; Make sure issue is fixed before enabling gesture for floating screens
16+
;; Issue: https://github.com/status-im/status-mobile/pull/16438#issuecomment-1621397789
17+
;; More Info: https://github.com/status-im/status-mobile/pull/16438#issuecomment-1622589147
1518
(defn floating-screen-gesture
1619
[screen-id]
1720
(let [{:keys [screen-left screen-state]} (get @state/shared-values-atom screen-id)

Diff for: src/utils/worklets/shell.cljs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
(ns utils.worklets.shell
2-
(:require [utils.collection]
3-
[camel-snake-kebab.core :as csk]))
1+
(ns utils.worklets.shell)
42

53
(def bottom-tabs-worklets (js/require "../src/js/worklets/shell/bottom_tabs.js"))
64
(def home-stack-worklets (js/require "../src/js/worklets/shell/home_stack.js"))
@@ -96,6 +94,4 @@
9694

9795
(defn floating-screen-gesture-on-end
9896
[data]
99-
(.screenGestureOnEnd
100-
^js floating-screen-worklets
101-
(clj->js (utils.collection/map-keys csk/->camelCaseString data))))
97+
(.screenGestureOnEnd ^js floating-screen-worklets (clj->js data)))

0 commit comments

Comments
 (0)