Skip to content

Commit f86dde4

Browse files
committed
Comments
1 parent eea74af commit f86dde4

File tree

2 files changed

+56
-56
lines changed

2 files changed

+56
-56
lines changed

Diff for: src/status_im/ui/screens/profile/contact/views.cljs

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
[status-im.ui.components.toolbar :as toolbar]
1414
[status-im.ui.components.topbar :as topbar]
1515
[status-im.ui.screens.profile.components.sheets :as sheets]
16-
[utils.re-frame :as rf]))
16+
[utils.re-frame :as rf]
17+
[status-im2.constants :as constants]))
1718

1819
(defn actions
1920
[{:keys [public-key added? blocked? ens-name mutual?] :as contact} muted?]
@@ -43,7 +44,7 @@
4344
:selected muted?
4445
:disabled blocked?
4546
:action (when-not blocked?
46-
#(re-frame/dispatch [:chat.ui/mute public-key (not muted?) (when-not muted? 5)]))}]
47+
#(re-frame/dispatch [:chat.ui/mute public-key (not muted?) (when-not muted? constants/mute-till-unmuted)]))}]
4748
[{:label (i18n/label (if blocked? :t/unblock :t/block))
4849
:negative true
4950
:selected blocked?

Diff for: src/status_im2/common/mute_chat_drawer/view.cljs

+53-54
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(ns status-im2.common.mute-chat-drawer.view
22
(:require [utils.i18n :as i18n]
3-
[quo2.core :as quo2]
3+
[quo2.core :as quo]
44
[react-native.core :as rn]
55
[status-im2.constants :as constants]
66
[utils.re-frame :as rf]
@@ -12,56 +12,55 @@
1212
(rf/dispatch event))
1313

1414
(defn mute-chat-drawer [chat-id accessibility-label]
15-
(fn []
16-
[rn/view {:accessibility-label accessibility-label}
17-
[quo2/text {:weight :medium
18-
:size :paragraph-2
19-
:style (style/header-text)} (i18n/label :i/mute-channel)]
20-
[quo2/menu-item
21-
{:type :transparent
22-
:title (i18n/label :i/mute-for-1-min)
23-
:icon-bg-color :transparent
24-
:container-padding-vertical 12
25-
:title-column-style {:margin-left 2}
26-
:on-press (fn []
27-
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-1-min]))}]
28-
[quo2/menu-item
29-
{:type :transparent
30-
:title (i18n/label :i/mute-for-15-mins)
31-
:icon-bg-color :transparent
32-
:container-padding-vertical 12
33-
:title-column-style {:margin-left 2}
34-
:on-press (fn []
35-
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-15-mins-type]))}]
36-
[quo2/menu-item
37-
{:type :transparent
38-
:title (i18n/label :i/mute-for-1-hour)
39-
:icon-bg-color :transparent
40-
:container-padding-vertical 12
41-
:title-column-style {:margin-left 2}
42-
:on-press (fn []
43-
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-1-hour-type]))}]
44-
[quo2/menu-item
45-
{:type :transparent
46-
:title (i18n/label :i/mute-for-8-hours)
47-
:icon-bg-color :transparent
48-
:container-padding-vertical 12
49-
:title-column-style {:margin-left 2}
50-
:on-press (fn []
51-
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-8-hours-type]))}]
52-
[quo2/menu-item
53-
{:type :transparent
54-
:title (i18n/label :i/mute-for-1-week)
55-
:icon-bg-color :transparent
56-
:container-padding-vertical 12
57-
:title-column-style {:margin-left 2}
58-
:on-press (fn []
59-
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-1-week]))}]
60-
[quo2/menu-item
61-
{:type :transparent
62-
:title (i18n/label :i/mute-till-unmute)
63-
:icon-bg-color :transparent
64-
:container-padding-vertical 12
65-
:title-column-style {:margin-left 2}
66-
:on-press (fn []
67-
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-till-unmuted]))}]]))
15+
[rn/view {:accessibility-label accessibility-label}
16+
[quo/text {:weight :medium
17+
:size :paragraph-2
18+
:style (style/header-text)} (i18n/label :t/mute-channel)]
19+
[quo/menu-item
20+
{:type :transparent
21+
:title (i18n/label :t/mute-for-1-min)
22+
:icon-bg-color :transparent
23+
:container-padding-vertical 12
24+
:title-column-style {:margin-left 2}
25+
:on-press (fn []
26+
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-1-min]))}]
27+
[quo/menu-item
28+
{:type :transparent
29+
:title (i18n/label :t/mute-for-15-mins)
30+
:icon-bg-color :transparent
31+
:container-padding-vertical 12
32+
:title-column-style {:margin-left 2}
33+
:on-press (fn []
34+
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-15-mins-type]))}]
35+
[quo/menu-item
36+
{:type :transparent
37+
:title (i18n/label :t/mute-for-1-hour)
38+
:icon-bg-color :transparent
39+
:container-padding-vertical 12
40+
:title-column-style {:margin-left 2}
41+
:on-press (fn []
42+
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-1-hour-type]))}]
43+
[quo/menu-item
44+
{:type :transparent
45+
:title (i18n/label :t/mute-for-8-hours)
46+
:icon-bg-color :transparent
47+
:container-padding-vertical 12
48+
:title-column-style {:margin-left 2}
49+
:on-press (fn []
50+
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-8-hours-type]))}]
51+
[quo/menu-item
52+
{:type :transparent
53+
:title (i18n/label :t/mute-for-1-week)
54+
:icon-bg-color :transparent
55+
:container-padding-vertical 12
56+
:title-column-style {:margin-left 2}
57+
:on-press (fn []
58+
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-for-1-week]))}]
59+
[quo/menu-item
60+
{:type :transparent
61+
:title (i18n/label :t/mute-till-unmute)
62+
:icon-bg-color :transparent
63+
:container-padding-vertical 12
64+
:title-column-style {:margin-left 2}
65+
:on-press (fn []
66+
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true constants/mute-till-unmuted]))}]])

0 commit comments

Comments
 (0)