Skip to content

Commit 4aa9730

Browse files
committed
fix position of the last item in the community chat list and the position of the jump-to button
1 parent 58d5c3d commit 4aa9730

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/status_im2/contexts/communities/overview/style.cljs

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(ns status-im2.contexts.communities.overview.style
22
(:require
3-
[quo.foundations.colors :as colors]))
3+
[quo.foundations.colors :as colors]
4+
[status-im2.contexts.shell.jump-to.constants :as jump-to.constants]))
45

56
(def screen-horizontal-padding 20)
67

@@ -41,6 +42,16 @@
4142
:right 0
4243
:bottom 0})
4344

45+
(def floating-shell-button
46+
{:position :absolute
47+
:bottom 21})
48+
49+
(defn channel-list-component
50+
[]
51+
{:margin-top 8
52+
:margin-bottom (+ 21 jump-to.constants/floating-shell-button-height)
53+
:flex 1})
54+
4455
(defn token-gated-container
4556
[]
4657
{:border-radius 16

src/status_im2/contexts/communities/overview/view.cljs

+7-7
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
{:on-layout #(on-first-channel-height-changed
8383
(+ 38 (int (Math/ceil (layout-y %))))
8484
(into #{} (map (comp :name second) channels-list)))
85-
:style {:margin-top 8 :flex 1}}
85+
:style (style/channel-list-component)}
8686
(for [[category-id {:keys [chats name collapsed?]}] channels-list]
8787
[rn/view
8888
{:key category-id
@@ -91,12 +91,13 @@
9191
:on-layout #(on-category-layout name (int (layout-y %)))}
9292
(when-not (= constants/empty-category-id category-id)
9393
[quo/divider-label
94-
{:on-press #(collapse-category community-id category-id collapsed?)
95-
:chevron-icon (if collapsed? :i/chevron-right :i/chevron-down)
96-
:chevron :left}
94+
{:on-press #(collapse-category community-id category-id collapsed?)
95+
:chevron-icon (if collapsed? :i/chevron-right :i/chevron-down)
96+
:container-style {:margin-top 8}
97+
:chevron :left}
9798
name])
9899
(when-not collapsed?
99-
[rn/view {:style {:padding-horizontal 8 :padding-bottom 8}}
100+
[rn/view {:style {:padding-horizontal 8}}
100101
(for [chat chats]
101102
^{:key (:id chat)}
102103
[channel-chat-item community-id community-color chat])])])])
@@ -375,5 +376,4 @@
375376
{:jump-to {:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
376377
:customization-color customization-color
377378
:label (i18n/label :t/jump-to)}}
378-
{:position :absolute
379-
:bottom 34}]]))
379+
style/floating-shell-button]]))

0 commit comments

Comments
 (0)