|
@@ -2,7 +2,6 @@
|
|
|
"Main ns for handling mobile start"
|
|
"Main ns for handling mobile start"
|
|
|
(:require ["@capacitor/app" :refer [^js App]]
|
|
(:require ["@capacitor/app" :refer [^js App]]
|
|
|
["@capacitor/keyboard" :refer [^js Keyboard]]
|
|
["@capacitor/keyboard" :refer [^js Keyboard]]
|
|
|
- ["@capacitor/core" :refer [^js Plugins]]
|
|
|
|
|
[clojure.string :as string]
|
|
[clojure.string :as string]
|
|
|
[promesa.core :as p]
|
|
[promesa.core :as p]
|
|
|
[frontend.fs.capacitor-fs :as capacitor-fs]
|
|
[frontend.fs.capacitor-fs :as capacitor-fs]
|
|
@@ -12,9 +11,7 @@
|
|
|
[frontend.mobile.util :as mobile-util]
|
|
[frontend.mobile.util :as mobile-util]
|
|
|
[frontend.state :as state]
|
|
[frontend.state :as state]
|
|
|
[frontend.util :as util]
|
|
[frontend.util :as util]
|
|
|
- [cljs-bean.core :as bean]
|
|
|
|
|
- [goog.object :as gobj]))
|
|
|
|
|
-
|
|
|
|
|
|
|
+ [cljs-bean.core :as bean]))
|
|
|
|
|
|
|
|
(def *url (atom nil))
|
|
(def *url (atom nil))
|
|
|
;; FIXME: `appUrlOpen` are fired twice when receiving a same intent.
|
|
;; FIXME: `appUrlOpen` are fired twice when receiving a same intent.
|
|
@@ -99,13 +96,6 @@
|
|
|
(editor-handler/save-current-block!))
|
|
(editor-handler/save-current-block!))
|
|
|
(state/set-mobile-app-state-change is-active?))))
|
|
(state/set-mobile-app-state-change is-active?))))
|
|
|
|
|
|
|
|
-(defn app-active?
|
|
|
|
|
- "Returns a promise"
|
|
|
|
|
- []
|
|
|
|
|
- (let [app ^js (gobj/get Plugins "App")]
|
|
|
|
|
- (p/let [state (.getState app)]
|
|
|
|
|
- (gobj/get state "isActive"))))
|
|
|
|
|
-
|
|
|
|
|
(defn- general-init
|
|
(defn- general-init
|
|
|
"Initialize event listeners used by both iOS and Android"
|
|
"Initialize event listeners used by both iOS and Android"
|
|
|
[]
|
|
[]
|