File tree 4 files changed +48
-2
lines changed
src/status_im2/contexts/activity_center
4 files changed +48
-2
lines changed Original file line number Diff line number Diff line change
1
+ (ns status-im2.contexts.activity-center.notification.community-kicked.view
2
+ (:require [quo2.core :as quo]
3
+ [status-im2.contexts.activity-center.notification.common.style :as common-style]
4
+ [status-im2.contexts.activity-center.notification.common.view :as common]
5
+ [utils.datetime :as datetime]
6
+ [utils.i18n :as i18n]
7
+ [utils.re-frame :as rf]))
8
+
9
+ (defn- swipeable
10
+ [{:keys [active-swipeable extra-fn]} child]
11
+ [common/swipeable
12
+ {:left-button common/swipe-button-read-or-unread
13
+ :left-on-press common/swipe-on-press-toggle-read
14
+ :right-button common/swipe-button-delete
15
+ :right-on-press common/swipe-on-press-delete
16
+ :active-swipeable active-swipeable
17
+ :extra-fn extra-fn}
18
+ child])
19
+
20
+ (defn view
21
+ [{:keys [notification set-swipeable-height] :as props}]
22
+ (let [{:keys [community-id read
23
+ timestamp]} notification
24
+ community (rf/sub [:communities/community community-id])
25
+ community-name (:name community)
26
+ community-image (get-in community [:images :thumbnail :uri ])]
27
+ [swipeable props
28
+ [quo/activity-log
29
+ {:title (i18n/label :t/community-kicked-heading )
30
+ :icon :i/placeholder
31
+ :on-layout set-swipeable-height
32
+ :timestamp (datetime/timestamp->relative timestamp)
33
+ :unread? (not read)
34
+ :context [[quo/text {:style common-style/user-avatar-tag-text}
35
+ (i18n/label :t/community-kicked-body )]
36
+ [quo/context-tag common/tag-params {:uri community-image}
37
+ community-name]]}]]))
Original file line number Diff line number Diff line change 8
8
(def ^:const contact-request 5 )
9
9
(def ^:const community-request 7 )
10
10
(def ^:const admin 8 )
11
+ (def ^:const community-kicked 9 )
11
12
(def ^:const contact-verification 10 )
12
13
13
14
(def ^:const all-supported
18
19
contact-request
19
20
community-request
20
21
admin
22
+ community-kicked
21
23
contact-verification})
22
24
23
25
; ; TODO: Replace with correct enum values once status-go implements them.
29
31
it doesn't have a corresponding type in the backend. Think of the collection
30
32
as a composite key of actual types."
31
33
#{private-group-chat
32
- community-request})
34
+ community-request
35
+ community-kicked})
Original file line number Diff line number Diff line change 14
14
[status-im2.contexts.activity-center.notification.reply.view :as reply]
15
15
[status-im2.contexts.activity-center.notification.community-request.view :as
16
16
community-request]
17
+ [status-im2.contexts.activity-center.notification.community-kicked.view :as
18
+ community-kicked]
17
19
[status-im2.contexts.activity-center.style :as style]
18
20
[utils.i18n :as i18n]
19
21
[utils.re-frame :as rf]
203
205
204
206
types/community-request [community-request/view props]
205
207
208
+ types/community-kicked [community-kicked/view props]
209
+
206
210
nil )
207
211
208
212
:else
Original file line number Diff line number Diff line change 2078
2078
"community-request-not-accepted-body-text-prefix" : " Your request to join" ,
2079
2079
"community-request-not-accepted-body-text-suffix" : " hasn't been accepted" ,
2080
2080
"community-request-pending" : " Request pending" ,
2081
- "community-request-pending-body-text" : " You requested to join"
2081
+ "community-request-pending-body-text" : " You requested to join" ,
2082
+ "community-kicked-heading" : " Kicked from community" ,
2083
+ "community-kicked-body" : " You were kicked from"
2082
2084
}
You can’t perform that action at this time.
0 commit comments