fix(mobile): today's journal not created automatically

pull/3175/head
Tienson Qin 2021-09-28 09:32:21 +08:00
parent 2046a56e40
commit a7b8fd7fe9
5 changed files with 11 additions and 8 deletions

View File

@ -1,10 +1,10 @@
{
"appId": "com.logseq.app",
"appName": "Logseq",
"webDir": "public",
"bundledWebRuntime": false,
"webDir": "public",
"server": {
"url": "http://192.168.50.122:3001",
"url": "http://192.168.1.59:3001",
"cleartext": true
}
}

View File

@ -20,7 +20,8 @@
[frontend.util :as util]
[frontend.version :as version]
[reitit.frontend.easy :as rfe]
[rum.core :as rum]))
[rum.core :as rum]
[frontend.mobile.util :as mobile-util]))
(rum/defc add-repo
[args]
@ -189,7 +190,8 @@
[:a#repo-switch.fade-link.block.pr-2.whitespace-nowrap {:on-click toggle-fn}
[:span
(let [repo-name (get-repo-name current-repo)
repo-name (if (util/electron?)
repo-name (if (or (util/electron?)
(mobile-util/is-native-platform?))
(last
(string/split repo-name #"/"))
repo-name)]

View File

@ -348,7 +348,8 @@
(defn get-repo-path
[repo-url path]
(if (and (util/electron?) (local-db? repo-url))
(if (and (or (util/electron?) (mobile-util/is-native-platform?))
(local-db? repo-url))
path
(util/node-path.join (get-repo-dir repo-url) path)))
@ -356,7 +357,7 @@
[repo-url relative-path]
(when (and repo-url relative-path)
(cond
(and (util/electron?) (local-db? repo-url))
(and (or (util/electron?) (mobile-util/is-native-platform?)) (local-db? repo-url))
(let [dir (get-repo-dir repo-url)]
(if (string/starts-with? relative-path dir)
relative-path

View File

@ -86,7 +86,7 @@
(js/console.log result)
result))
(readdir [this dir] ; recursive
nil)
(readdir dir))
(unlink! [this repo path _opts]
nil)
(rmdir! [this dir]

View File

@ -48,7 +48,7 @@
(cond
mobile-native?
(map (fn [{:keys [uri content type size mtime]}]
{:file/path uri
{:file/path (string/replace uri "file://" "")
:file/last-modified-at mtime
:file/size size
:file/content content})