[#4759] Handle back button properly after sending transaction (Android).

This commit is contained in:
Roman Volosovskyi 2018-06-18 14:39:13 +03:00
parent 0dd5c11b47
commit 71ff9d9035
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 5 additions and 1 deletions

View File

@ -21,7 +21,8 @@
(let [stack (subscribe [:get :navigation-stack])
result-box (subscribe [:get-current-chat-ui-prop :result-box])
webview (subscribe [:get :webview-bridge])
view-id (subscribe [:get :view-id])]
view-id (subscribe [:get :view-id])
chat-id (subscribe [:get-current-chat-id])]
(cond
(and @webview (:can-go-back? @result-box))
@ -30,6 +31,9 @@
(#{:home :wallet :my-profile} view-id)
(do (.exitApp react/back-handler))
(= :wallet-transaction-sent @view-id)
(do (dispatch [:execute-stored-command-and-return-to-chat @chat-id]) true)
(< 1 (count @stack))
(do (dispatch [:navigate-back]) true)