[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]
|
||||
[status-im.i18n :as i18n]))
|
||||
|
||||
(defn view-profile [chat-id group?]
|
||||
(defn view-profile [chat-id]
|
||||
{: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 []
|
||||
{:label (i18n/label :t/clear-history)
|
||||
|
@ -19,11 +23,11 @@
|
|||
:action #(re-frame/dispatch [:leave-group-chat? chat-id])})
|
||||
|
||||
(defn- chat-actions [chat-id]
|
||||
[(view-profile chat-id false)
|
||||
[(view-profile chat-id)
|
||||
(delete-chat chat-id false)])
|
||||
|
||||
(defn- group-chat-actions [chat-id]
|
||||
[(view-profile chat-id true)
|
||||
[(group-info chat-id)
|
||||
(clear-history)
|
||||
(delete-chat chat-id true)
|
||||
(leave-group-chat chat-id false)])
|
||||
|
|
|
@ -152,6 +152,7 @@
|
|||
:chats "Chats"
|
||||
:delete-chat "Delete chat"
|
||||
:group-chat "Group chat"
|
||||
:group-info "Group info"
|
||||
: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?"
|
||||
:new-group-chat "New group chat"
|
||||
|
|
Loading…
Reference in New Issue