|
|
@@ -58,14 +58,6 @@
|
|
|
(f)
|
|
|
(js/setInterval f 5000)))
|
|
|
|
|
|
-(defn- icloud-sync!
|
|
|
- []
|
|
|
- (let [f (fn []
|
|
|
- (when (state/get-current-repo)
|
|
|
- (.downloadFilesFromiCloud mobile-util/download-icloud-files)))]
|
|
|
- (f)
|
|
|
- (js/setInterval f 300000)))
|
|
|
-
|
|
|
(defn- instrument!
|
|
|
[]
|
|
|
(let [total (srs/get-srs-cards-total)]
|
|
|
@@ -138,8 +130,9 @@
|
|
|
(js/console.error "Failed to request GitHub app tokens."))))
|
|
|
|
|
|
(watch-for-date!)
|
|
|
- (when (mobile-util/native-ios?)
|
|
|
- (icloud-sync!))
|
|
|
+ (when (and (state/get-current-repo)
|
|
|
+ (mobile-util/native-ios?))
|
|
|
+ (mobile-util/icloud-sync!))
|
|
|
(file-handler/watch-for-current-graph-dir!)))
|
|
|
(p/catch (fn [error]
|
|
|
(log/error :exception error))))))
|