android device back button goes back in webview #1204
This commit is contained in:
parent
dd976fb2af
commit
a623c02d53
|
@ -55,11 +55,16 @@
|
||||||
;; todo: it might be better always return false from
|
;; todo: it might be better always return false from
|
||||||
;; this listener and handle application's closing
|
;; this listener and handle application's closing
|
||||||
;; in handlers
|
;; in handlers
|
||||||
(let [stack (subscribe [:get :navigation-stack])
|
(let [stack (subscribe [:get :navigation-stack])
|
||||||
creating? (subscribe [:get :creating-account?])]
|
creating? (subscribe [:get :creating-account?])
|
||||||
|
result-box (subscribe [:chat-ui-props :result-box])
|
||||||
|
webview (subscribe [:get :webview-bridge])]
|
||||||
(cond
|
(cond
|
||||||
@creating? true
|
@creating? true
|
||||||
|
|
||||||
|
(and @webview (:can-go-back? @result-box))
|
||||||
|
(do (.goBack @webview) true)
|
||||||
|
|
||||||
(< 1 (count @stack))
|
(< 1 (count @stack))
|
||||||
(do (dispatch [:navigate-back]) true)
|
(do (dispatch [:navigate-back]) true)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue