Messages read back button (#16186)

* Fixed messages being immediately read, Removed community edit action

* fix instant messages reading when chat left by community link

* fix tests
This commit is contained in:
Volodymyr Kozieiev 2023-06-07 12:21:34 +01:00 committed by GitHub
parent ba4e2f76da
commit 1047190d69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 18 deletions

View File

@ -2,7 +2,6 @@
(:require
[quo.design-system.colors :as quo.colors]
[quo.react-native :as rn]
[re-frame.core :as re-frame]
[status-im.react-native.resources :as resources]
[status-im.ui.components.fast-image :as fast-image]
[status-im.ui.screens.chat.message.gap :as message.gap]
@ -251,9 +250,10 @@
[rn/text {:style {:color quo.colors/black}} description]]]
[rn/view (style/community-view-button)
[rn/touchable-opacity
{:on-press #(re-frame/dispatch
[:communities/navigate-to-community
(:id community)])}
{:on-press #(do (rf/dispatch
[:communities/navigate-to-community
(:id community)])
(rf/dispatch [:chat/close]))}
[rn/text
{:style {:text-align :center
:color quo.colors/blue}} (i18n/label :t/view)]]]])))

View File

@ -65,7 +65,9 @@
[rn/view {:style style/header-container}
[rn/touchable-opacity
{:active-opacity 1
:on-press #(rf/dispatch [:navigate-back])
:on-press #(do
(rf/dispatch [:chat/close])
(rf/dispatch [:navigate-back]))
:accessibility-label :back-button
:style (style/button-container {:margin-left 20})}
[quo/icon :i/arrow-left

View File

@ -69,8 +69,6 @@
(.toBeTruthy))
(-> (h/expect (h/get-by-translation-text :view-community-rules))
(.toBeTruthy))
(-> (h/expect (h/get-by-translation-text :edit-community))
(.toBeTruthy))
(-> (h/expect (h/get-by-translation-text :mark-as-read))
(.toBeTruthy))
(-> (h/expect (h/get-by-translation-text :mute-community))
@ -93,8 +91,6 @@
(.toBeTruthy))
(-> (h/expect (h/get-by-translation-text :view-community-rules))
(.toBeTruthy))
(-> (h/expect (h/get-by-translation-text :edit-community))
(.toBeTruthy))
(-> (h/expect (h/get-by-translation-text :mark-as-read))
(.toBeTruthy))
(-> (h/expect (h/get-by-translation-text :mute-community))

View File

@ -100,14 +100,6 @@
{:content (fn [] [leave-menu/cancel-request-sheet id
request-id])}])})
(defn edit-community
[id]
{:icon :i/edit
:label (i18n/label :t/edit-community)
:accessibility-label :edit-community
:on-press #(rf/dispatch [:communities/open-edit-community id]
(rf/dispatch [:hide-bottom-sheet]))})
(defn not-joined-options
[id token-gated?]
[[(when-not token-gated? (view-members id))
@ -144,7 +136,6 @@
[[(view-members id)
(view-rules id)
(when token-gated? (view-token-gating id))
(edit-community id)
(mark-as-read id)
(mute-community id muted?)
(community-notification-settings id)