No redirect for manually edited links (for webview) [#5201]

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Andrey Shovkoplyas 2018-07-18 11:01:00 +03:00
parent 9766740e43
commit 62bab5150e
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
2 changed files with 6 additions and 8 deletions

View File

@ -56,12 +56,6 @@
(fn [cofx [browser]]
(model/update-browser-and-navigate cofx browser)))
(handlers/register-handler-fx
:update-browser
[re-frame/trim-v]
(fn [cofx [browser]]
(model/update-browser-fx cofx browser)))
(handlers/register-handler-fx
:update-browser-on-nav-change
[re-frame/trim-v]

View File

@ -18,7 +18,8 @@
[status-im.ui.components.toolbar.actions :as actions]
[status-im.ui.components.tooltip.views :as tooltip]
[status-im.models.browser :as model]
[status-im.utils.platform :as platform]))
[status-im.utils.platform :as platform]
[status-im.utils.http :as http]))
(views/defview toolbar-content-dapp [name]
(views/letsubs [dapp [:get-dapp-by-name name]]
@ -41,7 +42,10 @@
[react/view
[react/view (styles/toolbar-content false)
[react/text-input {:on-change-text #(reset! url-text %)
:on-submit-editing #(re-frame/dispatch [:update-browser (assoc browser :url @url-text)])
:on-submit-editing #(re-frame/dispatch [:update-browser-on-nav-change
browser
(http/normalize-and-decode-url @url-text)
false])
:auto-focus (not url)
:placeholder (i18n/label :t/enter-url)
:auto-capitalize :none