From 50ac9125fee91bd8c6044803a883035255494600 Mon Sep 17 00:00:00 2001 From: Julien Eluard Date: Tue, 27 Feb 2018 10:22:49 +0100 Subject: [PATCH] [ISSUE #3386] Improved group chat details action label --- src/status_im/chat/views/actions.cljs | 12 ++++++++---- src/status_im/translations/en.cljs | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/status_im/chat/views/actions.cljs b/src/status_im/chat/views/actions.cljs index 4eb3ac085f..4a0e7cabcf 100644 --- a/src/status_im/chat/views/actions.cljs +++ b/src/status_im/chat/views/actions.cljs @@ -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)]) diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index 5c8254b48d..81b69d5dab 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -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"