diff --git a/src/status_im/chat/models/loading.cljs b/src/status_im/chat/models/loading.cljs index c56240d868..8b76bb5ae4 100644 --- a/src/status_im/chat/models/loading.cljs +++ b/src/status_im/chat/models/loading.cljs @@ -61,7 +61,8 @@ [db chat-id] (update-in db [:chats chat-id] assoc :unviewed-messages-count 0 - :unviewed-mentions-count 0)) + :unviewed-mentions-count 0 + :highlight false)) (fx/defn handle-mark-all-read-successful {:events [::mark-all-read-successful]} diff --git a/src/status_im/data_store/chats.cljs b/src/status_im/data_store/chats.cljs index e0af9cfd3d..ab928dea29 100644 --- a/src/status_im/data_store/chats.cljs +++ b/src/status_im/data_store/chats.cljs @@ -93,9 +93,11 @@ :unviewed-mentions-count (.-unviewedMentionsCount chat) :last-message {:content {:text (.-text chat) :parsed-text (types/js->clj (.-parsedText chat))} - :content-type (.-contentType chat)} + :content-type (.-contentType chat) + :community-id (.-contentCommunityId chat)} :last-clock-value (.-lastClockValue chat) - :profile-public-key (.-profile chat)} + :profile-public-key (.-profile chat) + :highlight (.-highlight chat)} rpc->type unmarshal-members)) diff --git a/src/status_im/ui/screens/communities/community.cljs b/src/status_im/ui/screens/communities/community.cljs index 589c174c60..8464c67d30 100644 --- a/src/status_im/ui/screens/communities/community.cljs +++ b/src/status_im/ui/screens/communities/community.cljs @@ -162,7 +162,7 @@ [sheets/actions home-item])}])}]) (defn categories-accordion [community-id chats categories edit data] - [rn/view {:padding-bottom 8} + [:<> (for [{:keys [name id]} (vals categories)] ^{:key (str "cat" name id)} [:<> diff --git a/src/status_im/ui/screens/home/views/inner_item.cljs b/src/status_im/ui/screens/home/views/inner_item.cljs index 9d27e808ae..e395beed7e 100644 --- a/src/status_im/ui/screens/home/views/inner_item.cljs +++ b/src/status_im/ui/screens/home/views/inner_item.cljs @@ -14,10 +14,11 @@ [status-im.utils.datetime :as time] [status-im.ui.components.chat-icon.styles :as chat-icon.styles])) -(defn preview-label [label-key] +(defn preview-label [label-key label-fn] [react/text {:style styles/last-message-text - :accessibility-label :no-messages-text} - (i18n/label label-key)]) + :accessibility-label :no-messages-text + :number-of-lines 1} + (i18n/label label-key label-fn)]) (def max-subheader-length 100) @@ -70,7 +71,11 @@ parsed-text)] (:components result))) -(defn message-content-text [{:keys [content content-type]} absolute] +(defn content-type-community-invite? [content-type community-id] + (and (= constants/content-type-community content-type) + (not (string/blank? community-id)))) + +(defn message-content-text [{:keys [content content-type community-id]} absolute] [react/view (when absolute {:position :absolute :left 72 :top 32 :right 80}) (cond (not (and content content-type)) @@ -95,7 +100,12 @@ [preview-label :t/image] (= constants/content-type-audio content-type) - [preview-label :t/audio])]) + [preview-label :t/audio] + + (content-type-community-invite? content-type community-id) + (let [{:keys [name]} + @(re-frame/subscribe [:communities/community community-id])] + [preview-label :t/community-message-preview {:community-name name}]))]) (def memo-timestamp (memoize @@ -154,8 +164,9 @@ (first @(re-frame/subscribe [:contacts/contact-two-names-by-identity chat-id])))]) (defn home-list-item [home-item opts] - (let [{:keys [chat-id chat-name color group-chat public? timestamp last-message muted emoji]} home-item] - [react/touchable-opacity (merge {:style {:height 64}} opts) + (let [{:keys [chat-id chat-name color group-chat public? timestamp last-message muted emoji highlight]} home-item + background-color (when highlight (colors/get-color :interactive-02))] + [react/touchable-opacity (merge {:style {:height 64 :background-color background-color}} opts) [:<> [chat-item-icon muted (and group-chat (not public?)) (and group-chat public?)] [chat-icon.screen/emoji-chat-icon-view chat-id group-chat chat-name emoji @@ -175,5 +186,5 @@ (memo-timestamp (if (pos? (:whisper-timestamp last-message)) (:whisper-timestamp last-message) timestamp))] - [message-content-text (select-keys last-message [:content :content-type]) true] + [message-content-text (select-keys last-message [:content :content-type :community-id]) true] [unviewed-indicator home-item]]])) diff --git a/status-go-version.json b/status-go-version.json index dce8b08da3..284688b568 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.89.13", - "commit-sha1": "b79d68c69684f754ea705469c552485905f58e32", - "src-sha256": "10h2y9kyahpfns4kfjqzayqfb7fwq94lmncp47snbcrwj03vaanq" + "version": "v0.89.14", + "commit-sha1": "c20e8ebdeffd14a881d8092ee64e5180ad53449e", + "src-sha256": "0jbmgj0m1hv1nx3frbzs7lsn8nqspsir5kpzn8lldfgkfgpv96h7" }