[#15241] Proper system message on being not a member of a group
This commit is contained in:
parent
998b40ec4f
commit
c6e63ff5a5
|
@ -7,7 +7,7 @@
|
||||||
[status-im2.constants :as constants]))
|
[status-im2.constants :as constants]))
|
||||||
|
|
||||||
(defn view
|
(defn view
|
||||||
[contact-id contact-request-state]
|
[contact-id contact-request-state group-chat]
|
||||||
(let [names (rf/sub [:contacts/contact-two-names-by-identity contact-id])]
|
(let [names (rf/sub [:contacts/contact-two-names-by-identity contact-id])]
|
||||||
[permission-context/view
|
[permission-context/view
|
||||||
[quo/button
|
[quo/button
|
||||||
|
@ -15,6 +15,9 @@
|
||||||
:on-press #(rf/dispatch [:chat.ui/show-profile contact-id])
|
:on-press #(rf/dispatch [:chat.ui/show-profile contact-id])
|
||||||
:before :i/communities}
|
:before :i/communities}
|
||||||
(cond
|
(cond
|
||||||
|
group-chat
|
||||||
|
(i18n/label :t/group-chat-not-member)
|
||||||
|
|
||||||
(or (not contact-request-state)
|
(or (not contact-request-state)
|
||||||
(= contact-request-state
|
(= contact-request-state
|
||||||
constants/contact-request-state-none)
|
constants/contact-request-state-none)
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
(defn chat-render
|
(defn chat-render
|
||||||
[]
|
[]
|
||||||
(let [;;NOTE: we want to react only on these fields, do not use full chat map here
|
(let [;;NOTE: we want to react only on these fields, do not use full chat map here
|
||||||
{:keys [chat-id contact-request-state show-input?] :as chat}
|
{:keys [chat-id contact-request-state group-chat show-input?] :as chat}
|
||||||
(rf/sub [:chats/current-chat-chat-view])]
|
(rf/sub [:chats/current-chat-chat-view])]
|
||||||
[safe-area/consumer
|
[safe-area/consumer
|
||||||
(fn [insets]
|
(fn [insets]
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
[pin.banner/banner chat-id]
|
[pin.banner/banner chat-id]
|
||||||
[messages.list/messages-list {:chat chat :show-input? show-input?}]
|
[messages.list/messages-list {:chat chat :show-input? show-input?}]
|
||||||
(if-not show-input?
|
(if-not show-input?
|
||||||
[contact-requests.bottom-drawer/view chat-id contact-request-state]
|
[contact-requests.bottom-drawer/view chat-id contact-request-state group-chat]
|
||||||
[composer/composer chat-id insets])])]))
|
[composer/composer chat-id insets])])]))
|
||||||
|
|
||||||
(defn chat
|
(defn chat
|
||||||
|
|
|
@ -642,6 +642,7 @@
|
||||||
"group-chat-member-removed": "**{{member}}** left the group",
|
"group-chat-member-removed": "**{{member}}** left the group",
|
||||||
"group-chat-members-count": "{{selected}}/{{max}} members",
|
"group-chat-members-count": "{{selected}}/{{max}} members",
|
||||||
"group-chat-name-changed": "**{{member}}** changed the group's name to **{{name}}**",
|
"group-chat-name-changed": "**{{member}}** changed the group's name to **{{name}}**",
|
||||||
|
"group-chat-not-member": "You are not a member of this group",
|
||||||
"group-chat-no-contacts": "You don't have any contacts yet.\nInvite your friends to start chatting",
|
"group-chat-no-contacts": "You don't have any contacts yet.\nInvite your friends to start chatting",
|
||||||
"leave-chat": "Leave chat",
|
"leave-chat": "Leave chat",
|
||||||
"leave-confirmation": "Leave {{chat-name}}",
|
"leave-confirmation": "Leave {{chat-name}}",
|
||||||
|
|
Loading…
Reference in New Issue