|
28 | 28 | []
|
29 | 29 | (let [{:keys [group-chat chat-id chat-name emoji
|
30 | 30 | chat-type]} (rf/sub [:chats/current-chat])
|
31 |
| - display-name (if (= chat-type constants/one-to-one-chat-type) |
32 |
| - (first (rf/sub [:contacts/contact-two-names-by-identity chat-id])) |
33 |
| - (str emoji " " chat-name)) |
34 |
| - online? (rf/sub [:visibility-status-updates/online? chat-id]) |
35 |
| - contact (when-not group-chat |
36 |
| - (rf/sub [:contacts/contact-by-address chat-id])) |
37 |
| - photo-path (rf/sub [:chats/photo-path chat-id]) |
38 |
| - avatar-image-key (if (seq (:images contact)) |
39 |
| - :profile-picture |
40 |
| - :ring-background)] |
| 31 | + display-name (if (= chat-type constants/one-to-one-chat-type) |
| 32 | + (first (rf/sub [:contacts/contact-two-names-by-identity chat-id])) |
| 33 | + (str emoji " " chat-name)) |
| 34 | + online? (rf/sub [:visibility-status-updates/online? chat-id]) |
| 35 | + contact (when-not group-chat |
| 36 | + (rf/sub [:contacts/contact-by-address chat-id])) |
| 37 | + photo-path (rf/sub [:chats/photo-path chat-id]) |
| 38 | + avatar-image-key (if (seq (:images contact)) |
| 39 | + :profile-picture |
| 40 | + :ring-background)] |
41 | 41 | [quo/page-nav
|
42 | 42 | {:align-mid? true
|
43 | 43 | :mid-section (if group-chat
|
|
68 | 68 | []
|
69 | 69 | (let [;;NOTE: we want to react only on these fields, do not use full chat map here
|
70 | 70 | {:keys [chat-id contact-request-state group-chat able-to-send-message?] :as chat}
|
71 |
| -<<<<<<< HEAD |
72 | 71 | (rf/sub [:chats/current-chat-chat-view])
|
73 | 72 | insets (safe-area/get-insets)]
|
74 | 73 | [rn/keyboard-avoiding-view
|
|
79 | 78 | [messages.list/messages-list chat insets]
|
80 | 79 | (if-not able-to-send-message?
|
81 | 80 | [contact-requests.bottom-drawer/view chat-id contact-request-state group-chat]
|
82 |
| - [:f> composer/f-composer chat-id insets])])) |
83 |
| -======= |
84 |
| - (rf/sub [:chats/current-chat-chat-view])] |
85 |
| - [safe-area/consumer |
86 |
| - (fn [insets] |
87 |
| - [rn/keyboard-avoiding-view |
88 |
| - {:style {:position :relative :flex 1} |
89 |
| - :keyboardVerticalOffset (- (:bottom insets))} |
90 |
| - [page-nav] |
91 |
| - [pin.banner/banner chat-id] |
92 |
| - [messages.list/messages-list chat insets] |
93 |
| - (if-not able-to-send-message? |
94 |
| - [contact-requests.bottom-drawer/view chat-id contact-request-state group-chat] |
95 |
| - [bottom-sheet-composer/bottom-sheet-composer insets])])])) |
| 81 | + [bottom-sheet-composer/bottom-sheet-composer insets])])) |
96 | 82 |
|
97 |
| ->>>>>>> 7a153f9a3 (composer reply) |
98 | 83 |
|
99 | 84 | (defn chat
|
100 | 85 | []
|
101 | 86 | (reagent/create-class
|
102 |
| - {:component-did-mount (fn [] |
103 |
| - (rn/hw-back-remove-listener navigate-back-handler) |
104 |
| - (rn/hw-back-add-listener navigate-back-handler)) |
105 |
| - :component-will-unmount (fn [] (rn/hw-back-remove-listener navigate-back-handler)) |
106 |
| - :reagent-render chat-render})) |
| 87 | + {:component-did-mount (fn [] |
| 88 | + (rn/hw-back-remove-listener navigate-back-handler) |
| 89 | + (rn/hw-back-add-listener navigate-back-handler)) |
| 90 | + :component-will-unmount (fn [] (rn/hw-back-remove-listener navigate-back-handler)) |
| 91 | + :reagent-render chat-render})) |
0 commit comments