fix visibility drop-down alignment in new ui (#13760)
This commit is contained in:
parent
13bacd4a1e
commit
ff1818d191
|
@ -1576,7 +1576,7 @@
|
|||
:<- [:home-items-show-number]
|
||||
(fn [[search-filter filtered-chats communities view-id home-items-show-number]]
|
||||
(if (or (= view-id :home)
|
||||
(and config/new-ui-enabled? (= view-id :chat-stack)))
|
||||
(and @config/new-ui-enabled? (= view-id :chat-stack)))
|
||||
(let [communities-count (count communities)
|
||||
chats-count (count filtered-chats)
|
||||
;; If we have both communities & chats we want to display
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
(ns status-im.switcher.constants
|
||||
(:require [status-im.utils.handlers :refer [<sub]]
|
||||
(:require [quo.react-native :as rn]
|
||||
[status-im.utils.handlers :refer [<sub]]
|
||||
[status-im.utils.platform :as platform]))
|
||||
|
||||
;; For translucent status bar, dimensions/window also includes status bar's height,
|
||||
;; For translucent status bar(android), dimensions/window also includes status bar's height,
|
||||
;; this offset is used for correctly calculating switcher position
|
||||
(def switcher-height-offset 24)
|
||||
(def switcher-height-offset
|
||||
(if platform/android? (:status-bar-height @rn/navigation-const) 0))
|
||||
|
||||
;; extra height of switcher container for show/peek hidden cards while opening animation
|
||||
(def switcher-container-height-padding 100)
|
||||
|
|
|
@ -26,10 +26,17 @@
|
|||
(re-frame/dispatch
|
||||
[:visibility-status-updates/delayed-visibility-status-update status-type]))
|
||||
|
||||
;; In new ui, we are allowing switcher to overlap status-bar (draw over status bar)
|
||||
;; that's why the measure will return height including, the height of the status bar in android
|
||||
;; for calculating the correct position of the button on the profile screen, we have to decrease this height
|
||||
(defn calculate-button-height-and-dispatch-popover []
|
||||
(.measure @button-ref
|
||||
(fn [_ _ _ _ _ py]
|
||||
(dispatch-popover py))))
|
||||
(.measure
|
||||
@button-ref
|
||||
(fn [_ _ _ _ _ py]
|
||||
(dispatch-popover
|
||||
(if (and platform/android? @config/new-ui-enabled?)
|
||||
(- py (:status-bar-height @rn/navigation-const))
|
||||
py)))))
|
||||
|
||||
(defn profile-visibility-status-dot [status-type color]
|
||||
(let [automatic? (= status-type
|
||||
|
|
Loading…
Reference in New Issue