mirror of
https://github.com/logseq/logseq.git
synced 2026-05-29 15:09:41 +00:00
enhance(ios): add sync progress
This commit is contained in:
@@ -323,7 +323,7 @@
|
||||
[_state]
|
||||
(let [_ (state/sub :auth/id-token)
|
||||
online? (state/sub :network/online?)
|
||||
enabled-progress-panel? (util/electron?)
|
||||
enabled-progress-panel? (or (util/electron?) (mobile-util/native-ios?))
|
||||
current-repo (state/get-current-repo)
|
||||
creating-remote-graph? (state/sub [:ui/loading? :graph/create-remote?])
|
||||
current-graph-id (state/sub-current-file-sync-graph-uuid)
|
||||
@@ -428,7 +428,7 @@
|
||||
synced-file-graph?
|
||||
(concat
|
||||
(if (and no-active-files? idle?)
|
||||
[(when-not (util/electron?)
|
||||
[(when-not (or (util/electron?) (mobile-util/native-ios?))
|
||||
{:item [:div.flex.justify-center.w-full.py-2
|
||||
[:span.opacity-60 "Everything is synced!"]]
|
||||
:as-link? false})]
|
||||
@@ -503,7 +503,7 @@
|
||||
;; options
|
||||
{:outer-header
|
||||
[:<>
|
||||
(when (util/electron?)
|
||||
(when (or (util/electron?) (mobile-util/native-ios?))
|
||||
(indicator-progress-pane
|
||||
sync-state sync-progress
|
||||
{:idle? idle?
|
||||
|
||||
@@ -37,9 +37,15 @@
|
||||
|
||||
(mobile-util/check-ios-zoomed-display)
|
||||
|
||||
;; keep this the same logic as src/main/electron/listener.cljs
|
||||
(.addListener mobile-util/file-sync "debug"
|
||||
(fn [event]
|
||||
(js/console.log "🔄" event))))
|
||||
(js/console.log "🔄" event)
|
||||
(let [event (js->clj event :keywordize-keys true)
|
||||
payload (:data event)]
|
||||
(when (or (= (:event event) "download:progress")
|
||||
(= (:event event) "upload:progress"))
|
||||
(state/set-state! [:file-sync/graph-state (:graphUUID payload) :file-sync/progress (:file payload)] payload))))))
|
||||
|
||||
(defn- android-init
|
||||
"Initialize Android-specified event listeners"
|
||||
|
||||
Reference in New Issue
Block a user