Skip to content

Commit

Permalink
Fix bottom on iOS and simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
ulisesmac committed Nov 6, 2023
1 parent 1519256 commit 9d3f17e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@

(defn get-margin-bottom
[{:keys [blur? keyboard-will-show?]}]
(if (and platform/ios?
(or keyboard-will-show? blur?))
(safe-area/get-bottom)
0))
(if (or blur? keyboard-will-show?)
0
(safe-area/get-bottom)))

(defn animate-margin-bottom
[margin-bottom-shared-value]
(reanimated/apply-animations-to-style
{:margin-bottom margin-bottom-shared-value}
{}))
{:margin-top :auto}))
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[rn/view {:style styles}
(if blur?
[blur/view {:blur-amount 12
:blur-radius 25
:blur-radius 12
:blur-type (quo.theme/theme-value :light :dark theme)
;:style (style/inner-blur-container theme)
}
Expand All @@ -34,7 +34,6 @@
[{:keys [on-layout keyboard-will-show? blur?]
:as props}
children]
(prn props)
(let [theme (quo.theme/use-theme-value)
margin-bottom (reanimated/use-shared-value (style/get-margin-bottom props))]
(rn/use-effect
Expand Down
3 changes: 1 addition & 2 deletions src/status_im2/common/floating_button_page/style.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
:bottom 0
:left 0
:right 0
:flex 1
:justify-content :flex-end
;:background-color :blue
})
7 changes: 5 additions & 2 deletions src/status_im2/common/floating_button_page/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@
[rn/view {:on-layout set-content-container-height}
page-content]]
[rn/keyboard-avoiding-view
{:style style/keyboard-avoiding-view
:pointer-events :box-none}
{:style style/keyboard-avoiding-view
:keyboard-vertical-offset (if platform/ios?
(safe-area/get-top)
0)
:pointer-events :box-none}
[floating-container/view
{:on-layout set-floating-container-height
:keyboard-will-show? @keyboard-will-show?
Expand Down

0 comments on commit 9d3f17e

Please sign in to comment.