[ISSUE #3386] Improved group chat details action label
This commit is contained in:
parent
57278d2cf9
commit
50ac9125fe
|
@ -2,9 +2,13 @@
|
||||||
(:require [re-frame.core :as re-frame]
|
(:require [re-frame.core :as re-frame]
|
||||||
[status-im.i18n :as i18n]))
|
[status-im.i18n :as i18n]))
|
||||||
|
|
||||||
(defn view-profile [chat-id group?]
|
(defn view-profile [chat-id]
|
||||||
{:label (i18n/label :t/view-profile)
|
{:label (i18n/label :t/view-profile)
|
||||||
:action #(re-frame/dispatch [(if group? :show-group-chat-profile :show-profile) chat-id])})
|
:action #(re-frame/dispatch [:show-profile chat-id])})
|
||||||
|
|
||||||
|
(defn group-info [chat-id]
|
||||||
|
{:label (i18n/label :t/group-info)
|
||||||
|
:action #(re-frame/dispatch [:show-group-chat-profile chat-id])})
|
||||||
|
|
||||||
(defn- clear-history []
|
(defn- clear-history []
|
||||||
{:label (i18n/label :t/clear-history)
|
{:label (i18n/label :t/clear-history)
|
||||||
|
@ -19,11 +23,11 @@
|
||||||
:action #(re-frame/dispatch [:leave-group-chat? chat-id])})
|
:action #(re-frame/dispatch [:leave-group-chat? chat-id])})
|
||||||
|
|
||||||
(defn- chat-actions [chat-id]
|
(defn- chat-actions [chat-id]
|
||||||
[(view-profile chat-id false)
|
[(view-profile chat-id)
|
||||||
(delete-chat chat-id false)])
|
(delete-chat chat-id false)])
|
||||||
|
|
||||||
(defn- group-chat-actions [chat-id]
|
(defn- group-chat-actions [chat-id]
|
||||||
[(view-profile chat-id true)
|
[(group-info chat-id)
|
||||||
(clear-history)
|
(clear-history)
|
||||||
(delete-chat chat-id true)
|
(delete-chat chat-id true)
|
||||||
(leave-group-chat chat-id false)])
|
(leave-group-chat chat-id false)])
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
:chats "Chats"
|
:chats "Chats"
|
||||||
:delete-chat "Delete chat"
|
:delete-chat "Delete chat"
|
||||||
:group-chat "Group chat"
|
:group-chat "Group chat"
|
||||||
|
:group-info "Group info"
|
||||||
:delete-chat-confirmation "Are you sure you want to delete this chat?"
|
:delete-chat-confirmation "Are you sure you want to delete this chat?"
|
||||||
:delete-group-chat-confirmation "Are you sure you want to delete this group chat?"
|
:delete-group-chat-confirmation "Are you sure you want to delete this group chat?"
|
||||||
:new-group-chat "New group chat"
|
:new-group-chat "New group chat"
|
||||||
|
|
Loading…
Reference in New Issue