|
29 | 29 | [rn/activity-indicator]]))) |
30 | 30 |
|
31 | 31 | (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] |
33 | 33 | (let [customization-color (rf/sub [:profile/customization-color])] |
34 | 34 | [:<> |
35 | | - [quo/drawer-top {:title newsTitle :description timestamp}] |
| 35 | + [quo/drawer-top {:title news-title :description timestamp}] |
36 | 36 | [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]) |
39 | 39 | [quo/text |
40 | 40 | {:style {:padding-horizontal 20 |
41 | 41 | :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))) |
44 | 44 | [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]))}}])])) |
53 | 51 |
|
54 | 52 | (defn view |
55 | 53 | [{: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)] |
59 | 57 | [common/swipeable |
60 | 58 | {:left-button common/swipe-button-read-or-unread |
61 | 59 | :left-on-press common/swipe-on-press-toggle-read |
62 | 60 | :right-button common/swipe-button-delete |
63 | 61 | :right-on-press common/swipe-on-press-delete |
64 | 62 | :extra-fn extra-fn} |
65 | 63 | [quo/activity-log |
66 | | - {:title newsTitle |
| 64 | + {:title news-title |
67 | 65 | :customization-color customization-color |
68 | 66 | :icon :i/status-logo-bw |
69 | 67 | :timestamp timestamp |
70 | | - :context [[quo/text {} newsDescription]] |
| 68 | + :context [[quo/text {} news-description]] |
71 | 69 | :items [{:type :button |
72 | 70 | :subtype :primary |
73 | 71 | :key :button-reply |
|
0 commit comments