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:
Parvesh Monu 2023-11-29 16:45:30 +05:30 committed by GitHub
parent 58d5c3d7a5
commit e5ce7fed3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 8 deletions

View File

@ -1,6 +1,7 @@
(ns status-im2.contexts.communities.overview.style
(: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)
@ -41,6 +42,16 @@
:right 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
[]
{:border-radius 16

View File

@ -82,7 +82,7 @@
{:on-layout #(on-first-channel-height-changed
(+ 38 (int (Math/ceil (layout-y %))))
(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]
[rn/view
{:key category-id
@ -91,12 +91,13 @@
:on-layout #(on-category-layout name (int (layout-y %)))}
(when-not (= constants/empty-category-id category-id)
[quo/divider-label
{:on-press #(collapse-category community-id category-id collapsed?)
:chevron-icon (if collapsed? :i/chevron-right :i/chevron-down)
:chevron :left}
{:on-press #(collapse-category community-id category-id collapsed?)
:chevron-icon (if collapsed? :i/chevron-right :i/chevron-down)
:container-style {:margin-top 8}
:chevron :left}
name])
(when-not collapsed?
[rn/view {:style {:padding-horizontal 8 :padding-bottom 8}}
[rn/view {:style {:padding-horizontal 8}}
(for [chat chats]
^{:key (:id chat)}
[channel-chat-item community-id community-color chat])])])])
@ -375,5 +376,4 @@
{:jump-to {:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
:customization-color customization-color
:label (i18n/label :t/jump-to)}}
{:position :absolute
:bottom 34}]]))
style/floating-shell-button]]))