mirror of https://github.com/logseq/logseq
feat(android): enable write/refresh files when switching apps (#3957)
feat(android): enable write/refresh files when switch appspull/3997/head
parent
5e92cec2d9
commit
d3757b6b3c
|
@ -42,10 +42,14 @@
|
|||
(println "iOS container path: " path))
|
||||
|
||||
;; Keyboard watcher
|
||||
(.addListener Keyboard "keyboardWillShow"
|
||||
#(state/pub-event! [:mobile/keyboard-will-show]))
|
||||
;; (.addListener Keyboard "keyboardDidShow"
|
||||
;; #(state/pub-event! [:mobile/keyboard-did-show]))
|
||||
;; (.addListener Keyboard "keyboardWillShow"
|
||||
;; #(state/pub-event! [:mobile/keyboard-will-show]))
|
||||
(.addListener Keyboard "keyboardDidShow"
|
||||
#(state/pub-event! [:mobile/keyboard-did-show])))
|
||||
|
||||
(when (mobile-util/is-native-platform?)
|
||||
(.addEventListener js/window "statusTap"
|
||||
#(util/scroll-to-top true))
|
||||
|
||||
(.addListener App "appStateChange"
|
||||
(fn [^js state]
|
||||
|
@ -54,8 +58,4 @@
|
|||
(if is-active?
|
||||
(p/do! (nfs-handler/refresh! repo repo/refresh-cb)
|
||||
(notification/show! "Notes updated!" :success true))
|
||||
(editor-handler/save-current-block!)))))))
|
||||
|
||||
(when (mobile-util/is-native-platform?)
|
||||
(.addEventListener js/window "statusTap"
|
||||
#(util/scroll-to-top true))))
|
||||
(editor-handler/save-current-block!))))))))
|
||||
|
|
Loading…
Reference in New Issue