Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
Parveshdhull committed May 5, 2023
1 parent 9960cfc commit 000fda7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
(defonce progress (atom nil))
(defonce paused (atom nil))

(defn on-layout
(defn store-screen-height
[evt]
(let [window-height (rf/sub [:dimensions/window-height])
height (or (oget evt "nativeEvent" "layout" "height") 0)
Expand All @@ -48,7 +48,8 @@
;; 4. In the case of devices without a notch, both heights should be the same,
;; but actual values differ in some pixels, so arbitrary 5 pixels is allowed
(when (and (> height width)
(>= (+ height 5) (or window-height 0)))
(>= (+ height 5) (or window-height 0))
(not= height @shell.animation/screen-height))
(reset! shell.animation/screen-height height)
(async-storage/set-item! :screen-height height))))

Expand All @@ -70,7 +71,7 @@

[rn/view
{:style style/background-container
:on-layout on-layout}
:on-layout store-screen-height}
[carousel/view
{:animate? animate?
:progress progress
Expand Down

0 comments on commit 000fda7

Please sign in to comment.