Compare commits

...
Author SHA1 Message Date
Omar Basem 5bcaa6562f fix 2023-05-24 13:59:23 +04:00
Omar Basem 71532be5f8 fix gradient 2023-05-24 13:53:29 +04:00
2 changed files with 7 additions and 4 deletions
@@ -61,9 +61,12 @@
(> (reanimated/get-shared-value layout-height) (oops/oget event "nativeEvent.layout.height")))) (> (reanimated/get-shared-value layout-height) (oops/oget event "nativeEvent.layout.height"))))
(defn calc-lines (defn calc-lines
[height] ([height]
(let [lines (Math/round (/ height constants/line-height))] (calc-lines height false))
(if platform/ios? lines (dec lines)))) ([height floor?]
(let [lines (/ height constants/line-height)
lines (if floor? (Math/floor lines) (Math/round lines))]
(if platform/ios? lines (dec lines)))))
(defn calc-extra-content-height (defn calc-extra-content-height
[images? link-previews? reply? edit?] [images? link-previews? reply? edit?]
@@ -36,7 +36,7 @@
insets) insets)
lines (utils/calc-lines (- @content-height lines (utils/calc-lines (- @content-height
constants/extra-content-offset)) constants/extra-content-offset))
max-lines (utils/calc-lines max-height) max-lines (utils/calc-lines max-height true)
animations (utils/init-animations animations (utils/init-animations
subs subs
lines lines