Skip to content

Commit

Permalink
chore: fix hide/show keyboard margin on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Son89 committed Oct 30, 2023
1 parent 4e4ccb0 commit 8ed0a6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[react-native.safe-area :as safe-area]
[status-im2.common.floating-button-page.floating-container.style :as style]))

(def duration 110)
(def duration 100)

(defn blur-container-props
[theme]
Expand Down Expand Up @@ -46,7 +46,7 @@
:else (safe-area/get-bottom))))

(defn f-view
[{:keys [on-layout theme show-background? keyboard-shown?]}
[{:keys [on-layout theme show-background? keyboard-shown? show-keyboard?]}
children]
(let [blur-active? show-background?
container-view (if blur-active? blur-container rn/view)
Expand All @@ -55,10 +55,10 @@
keyboard-shown?))]
(rn/use-effect #(reanimated/animate-shared-value-with-timing
margin-bottom
(get-margin-bottom show-background? keyboard-shown?)
(get-margin-bottom show-background? show-keyboard?)
duration
:easing4)
[show-background? keyboard-shown?])
[show-keyboard?])
[reanimated/view
{:style (reanimated/apply-animations-to-style
{:margin-bottom margin-bottom}
Expand Down
1 change: 1 addition & 0 deletions src/status_im2/common/floating_button_page/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
[floating-container/view
{:theme theme
:keyboard-shown? keyboard-shown
:show-keyboard? @show-keyboard?
:show-background? show-background?
:on-layout (fn [event]
(let [height (oops/oget event "nativeEvent.layout.height")]
Expand Down

0 comments on commit 8ed0a6a

Please sign in to comment.