fix: make identifier carousel swipe-able (#18515)
This commit is contained in:
parent
fd50e4281c
commit
cb586c8676
|
@ -30,7 +30,7 @@
|
|||
:status-indicator? false
|
||||
:customization-color customization-color}]]
|
||||
[rn/view
|
||||
{:style style/card-view}
|
||||
{:pointer-events :none :style style/card-view}
|
||||
[reanimated/view
|
||||
{:style (style/card-container container-background)}
|
||||
[rn/view {:style style/card-header}
|
||||
|
|
|
@ -15,3 +15,8 @@
|
|||
{:justify-self :flex-end
|
||||
:margin-bottom 46
|
||||
:margin-horizontal 20})
|
||||
|
||||
(defn carousel-background
|
||||
[height width]
|
||||
{:height height
|
||||
:width width})
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
paused? (atom nil)
|
||||
is-dragging? (atom nil)
|
||||
drag-amount (atom nil)
|
||||
window-width (rf/sub [:dimensions/window-width])
|
||||
window-height (rf/sub [:dimensions/window-height])
|
||||
{:keys [emoji-hash display-name compressed-key
|
||||
public-key]} (rf/sub [:profile/profile])
|
||||
{:keys [color]} (rf/sub [:onboarding/profile])
|
||||
|
@ -42,11 +44,16 @@
|
|||
{:animate? true
|
||||
:progress progress
|
||||
:paused? paused?
|
||||
:gesture :tappable
|
||||
:gesture :swipeable
|
||||
:is-dragging? is-dragging?
|
||||
:drag-amount drag-amount
|
||||
:header-text header-text}]
|
||||
[rn/view {:style style/content-container}
|
||||
:header-text header-text
|
||||
:background [rn/view
|
||||
{:style (style/carousel-background window-height
|
||||
(* (count header-text) window-width))}]}]
|
||||
[rn/view
|
||||
{:style style/content-container
|
||||
:pointer-events :box-none}
|
||||
[profile-card/profile-card
|
||||
{:profile-picture photo-path
|
||||
:name display-name
|
||||
|
|
Loading…
Reference in New Issue