-
Notifications
You must be signed in to change notification settings - Fork 984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[15128] Introduce muting for a specific duration #15253
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
b8754b6
Introduce muting for a specific duration
ibrkhalil ae5c442
Prepare fn calls
ibrkhalil b4733d4
Use const
ibrkhalil 867c76e
Make mute backward compatible
ibrkhalil edddee8
Add drawer
ibrkhalil 6b05414
Listen for unmute event
ibrkhalil a9d6a0d
Comments
ibrkhalil 0294b45
Bump statusgo
ibrkhalil dc96dd3
Lint
ibrkhalil 7e1ba42
Clean
ibrkhalil 377322a
Lint
ibrkhalil 0ab5ea7
cleanup mutetill on unmute
ibrkhalil 48f23bd
Bump status-go
ibrkhalil 7c7d897
Bump
ibrkhalil 150d51b
Bump status-go
ibrkhalil 0edb60d
Rebase
ibrkhalil 8f96433
Lint
ibrkhalil 9d47bea
Issue 1
ibrkhalil 2d9c8e2
Fixes
ibrkhalil 1c8db22
Bump status-go
ibrkhalil 25cfdd2
Bump version
ibrkhalil 3ba381d
Clean up
ibrkhalil 0fa1ba2
Merge branch 'develop' into mute-for-specific-amount-of-time
ibrkhalil 1ee5dd9
Clean
ibrkhalil 4dcb635
Merge branch 'mute-for-specific-amount-of-time' of https://www.github…
ibrkhalil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gonna have to go with a V2 naming to not break desktop muting functionality