-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[15128] Introduce muting for a specific duration (#15253)
- Loading branch information
Showing
14 changed files
with
147 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(ns status-im2.common.mute-chat-drawer.style | ||
(:require [quo2.foundations.colors :as colors])) | ||
|
||
(defn header-text | ||
[] | ||
{:margin-left 20 | ||
:margin-bottom 10 | ||
:color (colors/theme-colors colors/neutral-50 colors/neutral-40)}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
(ns status-im2.common.mute-chat-drawer.view | ||
(:require [utils.i18n :as i18n] | ||
[quo2.core :as quo] | ||
[react-native.core :as rn] | ||
[status-im2.constants :as constants] | ||
[utils.re-frame :as rf] | ||
[status-im2.common.mute-chat-drawer.style :as style])) | ||
|
||
(defn hide-sheet-and-dispatch | ||
[event] | ||
(rf/dispatch [:bottom-sheet/hide]) | ||
(rf/dispatch event)) | ||
|
||
(defn mute-chat-drawer | ||
[chat-id accessibility-label] | ||
[rn/view {:accessibility-label accessibility-label} | ||
[quo/text | ||
{:weight :medium | ||
:size :paragraph-2 | ||
:style (style/header-text)} (i18n/label :t/mute-channel)] | ||
[quo/menu-item | ||
{:type :transparent | ||
:title (i18n/label :t/mute-for-15-mins) | ||
:icon-bg-color :transparent | ||
:container-padding-vertical 12 | ||
:title-column-style {:margin-left 2} | ||
:on-press (fn [] | ||
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true | ||
constants/mute-for-15-mins-type]))}] | ||
[quo/menu-item | ||
{:type :transparent | ||
:title (i18n/label :t/mute-for-1-hour) | ||
:icon-bg-color :transparent | ||
:container-padding-vertical 12 | ||
:title-column-style {:margin-left 2} | ||
:on-press (fn [] | ||
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true | ||
constants/mute-for-1-hour-type]))}] | ||
[quo/menu-item | ||
{:type :transparent | ||
:title (i18n/label :t/mute-for-8-hours) | ||
:icon-bg-color :transparent | ||
:container-padding-vertical 12 | ||
:title-column-style {:margin-left 2} | ||
:on-press (fn [] | ||
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true | ||
constants/mute-for-8-hours-type]))}] | ||
[quo/menu-item | ||
{:type :transparent | ||
:title (i18n/label :t/mute-for-1-week) | ||
:icon-bg-color :transparent | ||
:container-padding-vertical 12 | ||
:title-column-style {:margin-left 2} | ||
:on-press (fn [] | ||
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true | ||
constants/mute-for-1-week]))}] | ||
[quo/menu-item | ||
{:type :transparent | ||
:title (i18n/label :t/mute-till-unmute) | ||
:icon-bg-color :transparent | ||
:container-padding-vertical 12 | ||
:title-column-style {:margin-left 2} | ||
:on-press (fn [] | ||
(hide-sheet-and-dispatch [:chat.ui/mute chat-id true | ||
constants/mute-till-unmuted]))}]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters