feat: add jump-to button in group-detail screen (#19134)
This commit is contained in:
parent
27407b9cbb
commit
2ee7db9370
|
@ -40,3 +40,6 @@
|
|||
:background-color (colors/theme-colors colors/white colors/neutral-95-opa-70)
|
||||
:flex-direction :row})
|
||||
|
||||
(def floating-shell-button
|
||||
{:position :absolute
|
||||
:bottom 21})
|
||||
|
|
|
@ -113,6 +113,7 @@
|
|||
members (rf/sub [:contacts/group-members-sections chat-id])
|
||||
pinned-messages (rf/sub [:chats/pinned chat-id])
|
||||
current-pk (rf/sub [:multiaccount/public-key])
|
||||
profile-color (rf/sub [:profile/customization-color])
|
||||
admin? (get admins current-pk)]
|
||||
[:<>
|
||||
[quo/gradient-cover
|
||||
|
@ -127,7 +128,6 @@
|
|||
group])}])}]
|
||||
:icon-name :i/arrow-left
|
||||
:on-press #(rf/dispatch [:navigate-back])}]
|
||||
|
||||
[quo/page-top
|
||||
{:title chat-name
|
||||
:avatar {:customization-color color}}]
|
||||
|
@ -167,4 +167,12 @@
|
|||
:render-section-footer-fn contacts-section-footer
|
||||
:render-data {:chat-id chat-id
|
||||
:admin? admin?}
|
||||
:render-fn contact-item-render}]]))
|
||||
:render-fn contact-item-render}]
|
||||
[quo/floating-shell-button
|
||||
{:jump-to {:on-press (fn []
|
||||
(rf/dispatch [:navigate-back])
|
||||
(rf/dispatch [:shell/navigate-to-jump-to])
|
||||
)
|
||||
:customization-color profile-color
|
||||
:label (i18n/label :t/jump-to)}}
|
||||
style/floating-shell-button]]))
|
||||
|
|
|
@ -70,8 +70,7 @@
|
|||
:on-scroll #(scroll-handler % scroll-y)
|
||||
:bounces false}]
|
||||
[quo/floating-shell-button
|
||||
{:key :shell
|
||||
:jump-to
|
||||
{:jump-to
|
||||
{:on-press (fn []
|
||||
(rf/dispatch [:navigate-back])
|
||||
(debounce/throttle-and-dispatch [:shell/navigate-to-jump-to] 500))
|
||||
|
|
Loading…
Reference in New Issue