Skip to content

Commit 0d5727d

Browse files
committed
review
1 parent 8393351 commit 0d5727d

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

src/legacy/status_im/data_store/activities.cljs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@
6464
:communityId :community-id
6565
:installationId :installation-id
6666
:membershipStatus :membership-status
67-
:albumMessages :album-messages})
67+
:albumMessages :album-messages
68+
:newsImageUrl :news-image-url
69+
:newsTitle :news-title
70+
:newsDescription :news-description
71+
:newsContent :news-content
72+
:newsLink :news-link
73+
:newsLinkLabel :news-link-label})
6874
(update :last-message #(when % (messages/<-rpc %)))
6975
(update :message #(when % (messages/<-rpc %)))
7076
(update :reply-message #(when % (messages/<-rpc %)))

src/status_im/contexts/shell/activity_center/notification/news/style.cljs

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/status_im/contexts/shell/activity_center/notification/news/view.cljs

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,45 +29,43 @@
2929
[rn/activity-indicator]])))
3030

3131
(defn sheet
32-
[{:keys [newsImageUrl newsTitle newsContent newsLink newsLinkLabel]} timestamp]
32+
[{:keys [news-image-url news-title news-content news-link news-link-label]} timestamp]
3333
(let [customization-color (rf/sub [:profile/customization-color])]
3434
[:<>
35-
[quo/drawer-top {:title newsTitle :description timestamp}]
35+
[quo/drawer-top {:title news-title :description timestamp}]
3636
[rn/scroll-view {:style {:flex 1}}
37-
(when (not (string/blank? newsImageUrl))
38-
[auto-resized-image newsImageUrl])
37+
(when (not (string/blank? news-image-url))
38+
[auto-resized-image news-image-url])
3939
[quo/text
4040
{:style {:padding-horizontal 20
4141
:padding-vertical 8}}
42-
newsContent]]
43-
(when (and (not (string/blank? newsLink)) (not (string/blank? newsLinkLabel)))
42+
news-content]]
43+
(when (and (not (string/blank? news-link)) (not (string/blank? news-link-label)))
4444
[quo/bottom-actions
45-
{:button-one-label newsLinkLabel
46-
:button-one-props {:customization-color
47-
customization-color
48-
:icon-right :i/external
49-
:on-press
50-
(fn []
51-
(rf/dispatch [:browser.ui/open-url newsLink])
52-
(rf/dispatch [:hide-bottom-sheet]))}}])]))
45+
{:button-one-label news-link-label
46+
:button-one-props {:customization-color customization-color
47+
:icon-right :i/external
48+
:on-press (fn []
49+
(rf/dispatch [:browser.ui/open-url news-link])
50+
(rf/dispatch [:hide-bottom-sheet]))}}])]))
5351

5452
(defn view
5553
[{:keys [notification extra-fn]}]
56-
(let [customization-color (rf/sub [:profile/customization-color])
57-
{:keys [newsTitle newsDescription timestamp]} notification
58-
timestamp (datetime/timestamp->relative timestamp)]
54+
(let [customization-color (rf/sub [:profile/customization-color])
55+
{:keys [news-title news-description timestamp]} notification
56+
timestamp (datetime/timestamp->relative timestamp)]
5957
[common/swipeable
6058
{:left-button common/swipe-button-read-or-unread
6159
:left-on-press common/swipe-on-press-toggle-read
6260
:right-button common/swipe-button-delete
6361
:right-on-press common/swipe-on-press-delete
6462
:extra-fn extra-fn}
6563
[quo/activity-log
66-
{:title newsTitle
64+
{:title news-title
6765
:customization-color customization-color
6866
:icon :i/status-logo-bw
6967
:timestamp timestamp
70-
:context [[quo/text {} newsDescription]]
68+
:context [[quo/text {} news-description]]
7169
:items [{:type :button
7270
:subtype :primary
7371
:key :button-reply

0 commit comments

Comments
 (0)