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