mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-28 17:36:38 +00:00
Make popover delay configurable (#15225)
Make the popover delay in milliseconds configurable. To open the Activity Center, 30ms delay seems to be more than enough. It's a quick fix because the current 250ms to open the AC gives the wrong impression to users (and confuses even us developers) who think the AC has a performance issue to open. See issue https://github.com/status-im/status-mobile/pull/15222 for the full discussion.
This commit is contained in:
parent
4190dfd26b
commit
041622d98b
@ -4,10 +4,14 @@
|
|||||||
(rf/defn show-popover
|
(rf/defn show-popover
|
||||||
{:events [:show-popover]}
|
{:events [:show-popover]}
|
||||||
[_ value]
|
[_ value]
|
||||||
{:show-popover nil
|
(let [delay-ms (or (:delay-ms value) 250)
|
||||||
;;TODO refactor popover just start animation on mount
|
value (dissoc value :delay-ms)]
|
||||||
:dispatch-later [{:ms 250 :dispatch [:show-popover-db value]}]
|
{:show-popover nil
|
||||||
:dismiss-keyboard nil})
|
;; We should probably refactor to start the animation on mount, so that the
|
||||||
|
;; delay can be removed. See comment for more details:
|
||||||
|
;; https://github.com/status-im/status-mobile/pull/15222#issuecomment-1450162137
|
||||||
|
:dispatch-later [{:ms delay-ms :dispatch [:show-popover-db value]}]
|
||||||
|
:dismiss-keyboard nil}))
|
||||||
|
|
||||||
(rf/defn show-popover-db
|
(rf/defn show-popover-db
|
||||||
{:events [:show-popover-db]}
|
{:events [:show-popover-db]}
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
:dispatch [:show-popover
|
:dispatch [:show-popover
|
||||||
{:view :activity-center
|
{:view :activity-center
|
||||||
:style {:margin 0}
|
:style {:margin 0}
|
||||||
|
:delay-ms 50
|
||||||
:disable-touchable-overlay? true
|
:disable-touchable-overlay? true
|
||||||
:blur-view? true
|
:blur-view? true
|
||||||
:blur-view-props {:blur-amount 20
|
:blur-view-props {:blur-amount 20
|
||||||
|
Loading…
x
Reference in New Issue
Block a user