File tree 2 files changed +20
-13
lines changed
quo2/components/notifications
status_im2/contexts/activity_center
2 files changed +20
-13
lines changed Original file line number Diff line number Diff line change 1
1
(ns quo2.components.notifications.toast
2
- (:require [quo2.components.icon :as icon]
2
+ (:require [quo2.components.avatars.user-avatar :as user-avatar]
3
+ [quo2.components.icon :as icon]
3
4
[quo2.components.markdown.text :as text]
4
5
[quo2.components.notifications.count-down-circle :as count-down-circle]
5
6
[quo2.foundations.colors :as colors]
104
105
105
106
(defn toast
106
107
[{:keys [icon icon-color title text action undo-duration undo-on-press container-style
107
- override-theme]}]
108
+ override-theme user ]}]
108
109
[toast-container
109
- {:left (when icon
110
- [icon/icon icon
111
- {:container-style {:width 20 :height 20 }
112
- :color (or icon-color
113
- (get-in themes
114
- [:icon (or override-theme (theme/get-theme ))
115
- :color ]))}])
110
+ {:left (cond icon
111
+ [icon/icon icon
112
+ {:container-style {:width 20 :height 20 }
113
+ :color (or icon-color
114
+ (get-in themes
115
+ [:icon (or override-theme (theme/get-theme ))
116
+ :color ]))}]
117
+ user
118
+ [user-avatar/user-avatar user])
116
119
:title title
117
120
:text text
118
121
:right (if undo-duration
Original file line number Diff line number Diff line change 499
499
accepted
500
500
(not dismissed))
501
501
(toasts/upsert cofx
502
- {:icon :placeholder
503
- :icon-color colors/primary-50-opa-40
502
+ {:user {:full-name name
503
+ :profile-picture (:identicon message)
504
+ :status-indicator? true
505
+ :online? nil
506
+ :size :small
507
+ :ring? false }
508
+ :icon-color colors/success-50-opa-40
504
509
:title (i18n/label :t/contact-request-accepted-toast
505
- {:name (:alias message)})})
506
-
510
+ {:name name})})
507
511
:else
508
512
cofx))
509
513
{:db db}
You can’t perform that action at this time.
0 commit comments