From 764bbf1e2c5a5631735fc2ef4bf0267f20426761 Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Mon, 24 Sep 2018 21:41:42 +0200 Subject: [PATCH] moved wallet under options Signed-off-by: yenda --- src/status_im/ui/screens/chat/actions.cljs | 13 ++++++++++--- src/status_im/ui/screens/chat/views.cljs | 6 +----- translations/en.json | 3 ++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/status_im/ui/screens/chat/actions.cljs b/src/status_im/ui/screens/chat/actions.cljs index bb974a5700..9260ac2a5b 100644 --- a/src/status_im/ui/screens/chat/actions.cljs +++ b/src/status_im/ui/screens/chat/actions.cljs @@ -2,6 +2,10 @@ (:require [re-frame.core :as re-frame] [status-im.i18n :as i18n])) +(def view-my-wallet + {:label (i18n/label :t/view-my-wallet) + :action #(re-frame/dispatch [:navigate-to :wallet-modal])}) + (defn view-profile [chat-id] {:label (i18n/label :t/view-profile) :action #(re-frame/dispatch [:show-profile chat-id])}) @@ -19,17 +23,20 @@ :action #(re-frame/dispatch [:remove-chat-and-navigate-home? chat-id group?])}) (defn- chat-actions [chat-id] - [(view-profile chat-id) + [view-my-wallet + (view-profile chat-id) (clear-history) (delete-chat chat-id false)]) (defn- group-chat-actions [chat-id] - [(group-info chat-id) + [view-my-wallet + (group-info chat-id) (clear-history) (delete-chat chat-id true)]) (defn- public-chat-actions [chat-id] - [(clear-history) + [view-my-wallet + (clear-history) (delete-chat chat-id true)]) (defn actions [group-chat? chat-id public?] diff --git a/src/status_im/ui/screens/chat/views.cljs b/src/status_im/ui/screens/chat/views.cljs index 1c36109048..38b830c7d1 100644 --- a/src/status_im/ui/screens/chat/views.cljs +++ b/src/status_im/ui/screens/chat/views.cljs @@ -59,11 +59,7 @@ (toolbar/nav-back-count {:home? true})) [toolbar-content/toolbar-content-view] (when-not modal? - [toolbar/actions [{:icon :icons/wallet - :icon-opts {:color :black - :accessibility-label :wallet-modal-button} - :handler #(re-frame/dispatch [:navigate-to :wallet-modal])} - {:icon :icons/options + [toolbar/actions [{:icon :icons/options :icon-opts {:color :black :accessibility-label :chat-menu-button} :handler #(on-options chat-id name group-chat public?)}]])] diff --git a/translations/en.json b/translations/en.json index 12ea6e3158..0a394006d3 100644 --- a/translations/en.json +++ b/translations/en.json @@ -731,5 +731,6 @@ "create-pin": "Create a PIN", "create-pin-description": "You'll need your card + this PIN to log in and to confirm transactions", "repeat-pin": "Repeate your PIN", - "pin-mismatch": "PIN does not match" + "pin-mismatch": "PIN does not match", + "view-my-wallet": "View my wallet" }