-
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.
- Loading branch information
Showing
16 changed files
with
329 additions
and
113 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
mute and unmute community | ||
|
||
https://github.com/status-im/status-go/compare/aded83fc...76b04d59 | ||
|
||
# Please enter the commit message for your changes. Lines starting | ||
# with '#' will be ignored, and an empty message aborts the commit. | ||
# | ||
# Date: Thu May 25 11:47:19 2023 +0300 | ||
# | ||
# On branch mute-community | ||
# Changes to be committed: | ||
# modified: ios/Podfile.lock | ||
# modified: src/quo2/components/community/community_list_view.cljs | ||
# modified: src/quo2/components/list_items/channel.cljs | ||
# modified: src/status_im/communities/core.cljs | ||
# modified: src/status_im/data_store/chats.cljs | ||
# modified: src/status_im2/common/bottom_sheet/styles.cljs | ||
# deleted: src/status_im2/common/mute_chat_drawer/view.cljs | ||
# renamed: src/status_im2/common/mute_chat_drawer/style.cljs -> src/status_im2/common/mute_drawer/style.cljs | ||
# new file: src/status_im2/common/mute_drawer/view.cljs | ||
# modified: src/status_im2/contexts/communities/actions/community_options/view.cljs | ||
# modified: src/status_im2/contexts/communities/overview/view.cljs | ||
# modified: status-go-version.json | ||
# modified: translations/en.json | ||
# |
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 was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...us_im2/common/mute_chat_drawer/style.cljs → src/status_im2/common/mute_drawer/style.cljs
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,95 @@ | ||
(ns status-im2.common.mute-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-drawer.style :as style])) | ||
|
||
(defn mute-chat | ||
[id] | ||
(rf/dispatch [:chat.ui/mute id])) | ||
|
||
(defn mute-community | ||
[id muted? muted-type] | ||
(rf/dispatch [:community/set-muted id muted? muted-type])) | ||
|
||
(defn hide-sheet-and-dispatch | ||
[{:keys [chat-id community-id muted? type muted-type]}] | ||
(rf/dispatch [:hide-bottom-sheet]) | ||
(if (= type :community) | ||
(mute-community community-id muted? muted-type) | ||
(mute-chat chat-id))) | ||
|
||
(defn mute-drawer | ||
[{:keys [chat-id community-id accessibility-label type muted?]}] | ||
[rn/view {:accessibility-label accessibility-label} | ||
[quo/text | ||
{:weight :medium | ||
:size :paragraph-2 | ||
:style (style/header-text)} (i18n/label (if community-id :t/mute-community :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-id chat-id | ||
:type type | ||
:community-id community-id | ||
:muted? muted? | ||
:muted-type 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-id chat-id | ||
:type type | ||
:community-id community-id | ||
:muted? muted? | ||
:muted-type 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-id chat-id | ||
:type type | ||
:community-id community-id | ||
:muted? muted? | ||
:muted-type 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-id chat-id | ||
:type type | ||
:community-id community-id | ||
:muted? muted? | ||
:muted-type 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-id chat-id | ||
:type type | ||
:community-id community-id | ||
:muted? muted? | ||
:muted-type 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
Oops, something went wrong.