File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 249249 (rf/sub [:contacts/contact-two-names-by-identity chat-id]))
250250 {:keys [ens-verified added?] :as contact} (when-not group-chat
251251 (rf/sub [:contacts/contact-by-address chat-id]))
252- unread-messages? (pos? unviewed-messages-count)]
252+ unread-messages? (pos? unviewed-messages-count)
253+ trust-status (rf/sub [:contacts/contact-trust-status chat-id])
254+ untrustworthy? (= constants/contact-trust-status-untrustworthy trust-status)]
253255 [rn/view {:style {:flex-direction :row }}
254256 [avatar-view
255257 {:contact contact
266268 :verified? ens-verified
267269 :contact? added?
268270 :muted? muted
271+ :untrustworthy? untrustworthy?
269272 :time-str (datetime/to-short-str timestamp)
270273 :style {:flex-shrink 1 }}]
271274 [last-message-preview group-chat last-message muted unread-messages?]]]
Original file line number Diff line number Diff line change 4545 :on-error #(log/error " failed remove contact trust status" % contact-id)}]}))
4646
4747(rf/reg-event-fx :contact/mark-as-untrusted-sheet
48- (fn [_ [public-key primary-name] :as item]
48+ (fn [_ { :keys [public-key primary-name] :as item} ]
4949 {:dispatch
5050 [:show-bottom-sheet
5151 {:content (fn []
Original file line number Diff line number Diff line change 302302 (seq admins) (assoc :owner {:title (i18n/label :t/owner ) :data admins})
303303 (seq online) (assoc :online {:title (i18n/label :t/online ) :data online})
304304 (seq offline) (assoc :offline {:title (i18n/label :t/offline ) :data offline}))))))
305+
306+ (re-frame/reg-sub
307+ :contacts/contact-trust-status
308+ (fn [[_ chat-id]]
309+ [(re-frame/subscribe [:contacts/contact-by-identity chat-id])])
310+ (fn [[contact]]
311+ (get contact :trust-status constants/contact-trust-status-unknown)))
You can’t perform that action at this time.
0 commit comments