Skip to content

Commit e335e9e

Browse files
committed
review
1 parent 0d5727d commit e335e9e

File tree

1 file changed

+26
-21
lines changed
  • src/status_im/contexts/shell/activity_center/notification/news

1 file changed

+26
-21
lines changed

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

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[promesa.core :as promesa]
44
[quo.core :as quo]
55
[react-native.core :as rn]
6+
[react-native.gesture :as gesture]
67
[status-im.contexts.shell.activity-center.notification.common.view :as common]
78
[utils.datetime :as datetime]
89
[utils.i18n :as i18n]
@@ -51,30 +52,34 @@
5152

5253
(defn view
5354
[{:keys [notification extra-fn]}]
54-
(let [customization-color (rf/sub [:profile/customization-color])
55-
{:keys [news-title news-description timestamp]} notification
56-
timestamp (datetime/timestamp->relative timestamp)]
55+
(let [customization-color (rf/sub [:profile/customization-color])
56+
{:keys [news-title
57+
news-description
58+
timestamp]} notification
59+
timestamp (datetime/timestamp->relative timestamp)
60+
on-press (rn/use-callback
61+
#(rf/dispatch [:show-bottom-sheet
62+
{:theme :dark
63+
:content (fn []
64+
[sheet notification timestamp])}]))]
5765
[common/swipeable
5866
{:left-button common/swipe-button-read-or-unread
5967
:left-on-press common/swipe-on-press-toggle-read
6068
:right-button common/swipe-button-delete
6169
:right-on-press common/swipe-on-press-delete
6270
:extra-fn extra-fn}
63-
[quo/activity-log
64-
{:title news-title
65-
:customization-color customization-color
66-
:icon :i/status-logo-bw
67-
:timestamp timestamp
68-
:context [[quo/text {} news-description]]
69-
:items [{:type :button
70-
:subtype :primary
71-
:key :button-reply
72-
:customization-color customization-color
73-
:label (i18n/label :t/read-more)
74-
:accessibility-label :read-more
75-
:on-press #(rf/dispatch
76-
[:show-bottom-sheet
77-
{:theme :dark
78-
:content
79-
(fn []
80-
[sheet notification timestamp])}])}]}]]))
71+
[gesture/touchable-without-feedback
72+
{:on-press on-press}
73+
[quo/activity-log
74+
{:title news-title
75+
:customization-color customization-color
76+
:icon :i/status-logo-bw
77+
:timestamp timestamp
78+
:context [[quo/text {} news-description]]
79+
:items [{:type :button
80+
:subtype :primary
81+
:key :button-reply
82+
:customization-color customization-color
83+
:label (i18n/label :t/read-more)
84+
:accessibility-label :read-more
85+
:on-press on-press}]}]]]))

0 commit comments

Comments
 (0)