File tree 5 files changed +17
-6
lines changed
5 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 50
50
item])))))
51
51
52
52
(defn add-manage-members
53
- [{:keys [scroll-enabled? on-scroll]}]
53
+ [{:keys [on-scroll]}]
54
54
(let [theme (quo.theme/use-theme )
55
55
selected-participants (rf/sub [:group-chat/selected-participants ])
56
56
deselected-members (rf/sub [:group-chat/deselected-members ])
74
74
(i18n/label (if admin? :t/manage-members :t/add-members ))]
75
75
[gesture/section-list
76
76
{:key-fn :title
77
- :scroll-enabled @scroll-enabled?
78
77
:on-scroll on-scroll
79
78
:sticky-section-headers-enabled false
80
79
:sections (rf/sub [:contacts/grouped-by-first-letter ])
Original file line number Diff line number Diff line change 97
97
[{:keys [outgoing content pinned-by outgoing-status deleted? deleted-for-me? content-type
98
98
bridge-message]
99
99
:as message-data}
100
- {:keys [able-to-send-message? community? can-delete-message-for-everyone?
100
+ {:keys [able-to-send-message? community? community-member? can-delete-message-for-everyone?
101
101
message-pin-enabled group-chat group-admin?]}]
102
102
(concat
103
103
(when (and outgoing
131
131
:id :copy }])
132
132
; ; pinning images are temporarily disabled
133
133
(when (and message-pin-enabled
134
- (not= content-type constants/content-type-image))
134
+ (not= content-type constants/content-type-image)
135
+ (or community-member? (not community?)))
135
136
[{:type :main
136
137
:on-press #(pin-message message-data)
137
138
:label (i18n/label (if pinned-by
Original file line number Diff line number Diff line change 5
5
[react-native.reanimated :as reanimated]
6
6
[status-im.contexts.chat.messenger.messages.constants :as messages.constants]))
7
7
8
+ (def permission-context-height 46 )
9
+
8
10
(defn keyboard-avoiding-container
9
11
[theme]
10
12
{:flex 1
73
75
(reanimated/apply-animations-to-style
74
76
{:top top}
75
77
{:row-gap 16 }))
78
+
79
+ (defn permission-context-sheet
80
+ [margin-bottom?]
81
+ {:flex 3 ; ; Pushes composer to bottom
82
+ :margin-bottom (when margin-bottom? permission-context-height)})
Original file line number Diff line number Diff line change 400
400
{:keys [keyboard-shown]} (hooks/use-keyboard )
401
401
{window-height :height } (rn/get-window )
402
402
context (rf/sub [:chats/current-chat-message-list-view-context ])
403
+ able-to-send-message? (:able-to-send-message? context)
403
404
messages (rf/sub [:chats/raw-chat-messages-stream chat-id])
405
+ margin-bottom? (and community-channel? (not able-to-send-message?))
404
406
recording? (rf/sub [:chats/recording? ])]
405
- [rn/view {:style { :flex 3 }} ; ; Pushes composer to bottom
407
+ [rn/view {:style ( style/permission-context-sheet margin- bottom?)}
406
408
[rn/view {:style {:flex-shrink 1 }} ; ; Keeps flat list on top
407
409
[reanimated/flat-list
408
410
{:key-fn list-key-fn
409
411
:ref list-ref
410
412
:bounces false
411
413
:header [:<>
412
- [list-header insets ( : able-to-send-message? context) ]
414
+ [list-header insets able-to-send-message?]
413
415
(when (= (:chat-type chat) constants/private-group-chat-type)
414
416
[list-group-chat-header chat])]
415
417
:footer [list-footer
Original file line number Diff line number Diff line change 228
228
community? (some? current-community)
229
229
group-admin? (contains? admins current-public-key)
230
230
community-admin? (get current-community :admin false )
231
+ community-member? (get current-community :is-member? false )
231
232
232
233
message-pin-enabled
233
234
(cond public? false
247
248
:chat-id chat-id
248
249
:in-pinned-view? (boolean in-pinned-view?)
249
250
:able-to-send-message? able-to-send-message?
251
+ :community-member? community-member?
250
252
:message-pin-enabled message-pin-enabled
251
253
:can-delete-message-for-everyone? can-delete-message-for-everyone?})))
252
254
You can’t perform that action at this time.
0 commit comments