mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-15 11:14:26 +00:00
fix position of the last item in the community chat list and the position of the jump-to button (#17999)
This commit is contained in:
parent
58d5c3d7a5
commit
e5ce7fed3a
@ -1,6 +1,7 @@
|
|||||||
(ns status-im2.contexts.communities.overview.style
|
(ns status-im2.contexts.communities.overview.style
|
||||||
(:require
|
(:require
|
||||||
[quo.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]
|
||||||
|
[status-im2.contexts.shell.jump-to.constants :as jump-to.constants]))
|
||||||
|
|
||||||
(def screen-horizontal-padding 20)
|
(def screen-horizontal-padding 20)
|
||||||
|
|
||||||
@ -41,6 +42,16 @@
|
|||||||
:right 0
|
:right 0
|
||||||
:bottom 0})
|
:bottom 0})
|
||||||
|
|
||||||
|
(def floating-shell-button
|
||||||
|
{:position :absolute
|
||||||
|
:bottom 21})
|
||||||
|
|
||||||
|
(defn channel-list-component
|
||||||
|
[]
|
||||||
|
{:margin-top 8
|
||||||
|
:margin-bottom (+ 21 jump-to.constants/floating-shell-button-height)
|
||||||
|
:flex 1})
|
||||||
|
|
||||||
(defn token-gated-container
|
(defn token-gated-container
|
||||||
[]
|
[]
|
||||||
{:border-radius 16
|
{:border-radius 16
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
{:on-layout #(on-first-channel-height-changed
|
{:on-layout #(on-first-channel-height-changed
|
||||||
(+ 38 (int (Math/ceil (layout-y %))))
|
(+ 38 (int (Math/ceil (layout-y %))))
|
||||||
(into #{} (map (comp :name second) channels-list)))
|
(into #{} (map (comp :name second) channels-list)))
|
||||||
:style {:margin-top 8 :flex 1}}
|
:style (style/channel-list-component)}
|
||||||
(for [[category-id {:keys [chats name collapsed?]}] channels-list]
|
(for [[category-id {:keys [chats name collapsed?]}] channels-list]
|
||||||
[rn/view
|
[rn/view
|
||||||
{:key category-id
|
{:key category-id
|
||||||
@ -91,12 +91,13 @@
|
|||||||
:on-layout #(on-category-layout name (int (layout-y %)))}
|
:on-layout #(on-category-layout name (int (layout-y %)))}
|
||||||
(when-not (= constants/empty-category-id category-id)
|
(when-not (= constants/empty-category-id category-id)
|
||||||
[quo/divider-label
|
[quo/divider-label
|
||||||
{:on-press #(collapse-category community-id category-id collapsed?)
|
{:on-press #(collapse-category community-id category-id collapsed?)
|
||||||
:chevron-icon (if collapsed? :i/chevron-right :i/chevron-down)
|
:chevron-icon (if collapsed? :i/chevron-right :i/chevron-down)
|
||||||
:chevron :left}
|
:container-style {:margin-top 8}
|
||||||
|
:chevron :left}
|
||||||
name])
|
name])
|
||||||
(when-not collapsed?
|
(when-not collapsed?
|
||||||
[rn/view {:style {:padding-horizontal 8 :padding-bottom 8}}
|
[rn/view {:style {:padding-horizontal 8}}
|
||||||
(for [chat chats]
|
(for [chat chats]
|
||||||
^{:key (:id chat)}
|
^{:key (:id chat)}
|
||||||
[channel-chat-item community-id community-color chat])])])])
|
[channel-chat-item community-id community-color chat])])])])
|
||||||
@ -375,5 +376,4 @@
|
|||||||
{:jump-to {:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
|
{:jump-to {:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
|
||||||
:customization-color customization-color
|
:customization-color customization-color
|
||||||
:label (i18n/label :t/jump-to)}}
|
:label (i18n/label :t/jump-to)}}
|
||||||
{:position :absolute
|
style/floating-shell-button]]))
|
||||||
:bottom 34}]]))
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user