|
10 | 10 | [status-im.constants :as constants]
|
11 | 11 | [status-im.contexts.chat.group-details.style :as style]
|
12 | 12 | [utils.i18n :as i18n]
|
13 |
| - [utils.re-frame :as rf])) |
14 |
| - |
15 |
| -(defn back-button |
16 |
| - [] |
17 |
| - [quo/button |
18 |
| - {:type :grey |
19 |
| - :size 32 |
20 |
| - :icon-only? true |
21 |
| - :container-style {:margin-left 20} |
22 |
| - :accessibility-label :back-button |
23 |
| - :on-press #(rf/dispatch [:navigate-back])} |
24 |
| - :i/arrow-left]) |
25 |
| - |
26 |
| -(defn options-button |
27 |
| - [group] |
28 |
| - [quo/button |
29 |
| - {:type :grey |
30 |
| - :size 32 |
31 |
| - :icon-only? true |
32 |
| - :container-style {:margin-right 20} |
33 |
| - :accessibility-label :options-button |
34 |
| - :on-press #(rf/dispatch [:show-bottom-sheet |
35 |
| - {:content (fn [] [actions/group-details-actions group])}])} |
36 |
| - :i/options]) |
| 13 | + [utils.re-frame :as rf] |
| 14 | + [react-native.safe-area :as safe-area])) |
37 | 15 |
|
38 | 16 | (defn count-container
|
39 | 17 | [amount accessibility-label]
|
|
145 | 123 |
|
146 | 124 | (defn group-details
|
147 | 125 | []
|
148 |
| - (let [chat-id (rf/sub [:get-screen-params :group-chat-profile]) |
| 126 | + (let [top (safe-area/get-top) |
| 127 | + chat-id (rf/sub [:get-screen-params :group-chat-profile]) |
149 | 128 | {:keys [admins chat-id chat-name color public?
|
150 | 129 | muted contacts]
|
151 | 130 | :as group} (rf/sub [:chats/chat-by-id chat-id])
|
152 | 131 | members (rf/sub [:contacts/group-members-sections chat-id])
|
153 | 132 | pinned-messages (rf/sub [:chats/pinned chat-id])
|
154 | 133 | current-pk (rf/sub [:multiaccount/public-key])
|
155 | 134 | admin? (get admins current-pk)]
|
156 |
| - [rn/view |
157 |
| - {:style {:flex 1 |
158 |
| - :background-color (colors/theme-colors colors/white colors/neutral-95)}} |
159 |
| - [quo/header |
160 |
| - {:left-component [back-button] |
161 |
| - :right-component [options-button group] |
162 |
| - :background (colors/theme-colors colors/white colors/neutral-95)}] |
163 |
| - [rn/view |
164 |
| - {:style {:flex-direction :row |
165 |
| - :margin-top 24 |
166 |
| - :padding-horizontal 20}} |
167 |
| - [quo/group-avatar |
168 |
| - {:customization-color color |
169 |
| - :size :size-32}] |
170 |
| - [quo/text |
171 |
| - {:weight :semi-bold |
172 |
| - :size :heading-1 |
173 |
| - :style {:margin-horizontal 8}} chat-name] |
174 |
| - [rn/view {:style {:margin-top 8}} |
175 |
| - [quo/icon (if public? :i/world :i/privacy) |
176 |
| - {:size 20 :color (colors/theme-colors colors/neutral-50 colors/neutral-40)}]]] |
| 135 | + [:<> |
| 136 | + [quo/page-nav |
| 137 | + {:type :no-title |
| 138 | + :background :photo |
| 139 | + :right-side [{:icon-name :i/options |
| 140 | + :on-press #(rf/dispatch [:show-bottom-sheet |
| 141 | + {:content (fn [] [actions/group-details-actions |
| 142 | + group])}])}] |
| 143 | + :icon-name :i/arrow-left |
| 144 | + :on-press #(rf/dispatch [:navigate-back])}] |
| 145 | + [quo/gradient-cover |
| 146 | + {:height 286 |
| 147 | + :customization-color color}] |
| 148 | + [quo/page-top |
| 149 | + {:title chat-name |
| 150 | + :avatar {:customization-color color}}] |
177 | 151 | [rn/view {:style (style/actions-view)}
|
178 | 152 | [rn/touchable-opacity
|
179 | 153 | {:style (style/action-container color)
|
|
0 commit comments