mirror of
https://github.com/logseq/logseq.git
synced 2026-05-23 12:14:06 +00:00
chore: code cleanup
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
(defmethod events/handle :redirect-to-home [_]
|
||||
(page-handler/create-today-journal!)
|
||||
(when (util/capacitor?)
|
||||
(mobile-state/redirect-to-tab! "home")))
|
||||
(mobile-state/set-tab! "home")))
|
||||
|
||||
(defmethod events/handle :page/show-delete-dialog [[_ selected-rows ok-handler]]
|
||||
(shui/dialog-open!
|
||||
|
||||
@@ -77,6 +77,9 @@
|
||||
;; (state/pub-event! [:mobile/start-audio-record])
|
||||
;; (editor-handler/show-quick-add))
|
||||
nil)))
|
||||
(add-watch mobile-state/*tab ::select-tab
|
||||
(fn [_ _ old new]
|
||||
(when new (select! new))))
|
||||
(add-search-listener!
|
||||
(fn [q]
|
||||
;; wire up search handler
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
(page-handler/<delete!
|
||||
(fn []
|
||||
;; FIXME: empty screen, wrong route state
|
||||
(mobile-state/redirect-to-tab! "home"))
|
||||
(mobile-state/set-tab! "home"))
|
||||
{:error-handler
|
||||
(fn [{:keys [msg]}]
|
||||
(notification/show! msg :warning))})))))}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
[frontend.ui :as ui]
|
||||
[logseq.shui.popup.core :as shui-popup]
|
||||
[logseq.shui.ui :as shui]
|
||||
[mobile.bottom-tabs :as bottom-tabs]
|
||||
[mobile.state :as mobile-state]
|
||||
[rum.core :as rum]))
|
||||
|
||||
@@ -105,7 +106,7 @@
|
||||
(= :download-rtc-graph (first args))
|
||||
(do
|
||||
(dismiss-native-sheet!)
|
||||
(mobile-state/redirect-to-tab! "home"))
|
||||
(mobile-state/set-tab! "home"))
|
||||
|
||||
:else
|
||||
(if (and @*last-popup-modal? (not (= (first args) :editor.commands/commands)))
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
:skip-refresh? true})))))
|
||||
|
||||
:graphs
|
||||
(mobile-state/redirect-to-tab! "settings")
|
||||
(mobile-state/set-tab! "settings")
|
||||
|
||||
:import
|
||||
(shui/popup-show! nil (fn []
|
||||
|
||||
@@ -39,9 +39,6 @@
|
||||
(state/pub-event! [:mobile/start-audio-record])
|
||||
(and (= hostname "mobile") (= pathname "/go/quick-add"))
|
||||
(editor-handler/show-quick-add)
|
||||
(and (= hostname "mobile")
|
||||
(contains? #{"/go/favorites"} pathname))
|
||||
(mobile-state/redirect-to-tab! "favorites")
|
||||
(= hostname "graph")
|
||||
(let [graph-name (some-> pathname
|
||||
(string/replace "/" "")
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
[]
|
||||
(= :ls-quick-add (get-in @*popup-data [:opts :id])))
|
||||
|
||||
(defn redirect-to-tab! [name]
|
||||
(set-tab! (str name)))
|
||||
|
||||
(defonce *log (atom []))
|
||||
(defn log-append!
|
||||
[record]
|
||||
|
||||
Reference in New Issue
Block a user