mirror of
https://github.com/logseq/logseq.git
synced 2026-05-23 12:14:06 +00:00
fix: search recents
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
[frontend.handler.editor :as editor-handler]
|
||||
[frontend.handler.route :as route-handler]
|
||||
[frontend.util :as util]
|
||||
[logseq.common.util :as common-util]
|
||||
[mobile.state :as mobile-state]
|
||||
[promesa.core :as p]))
|
||||
|
||||
@@ -85,7 +86,8 @@
|
||||
(fn [q]
|
||||
;; wire up search handler
|
||||
(js/console.log "Native search query" q)
|
||||
(reset! mobile-state/*search-input q)))))
|
||||
(reset! mobile-state/*search-input q)
|
||||
(reset! mobile-state/*search-last-input-at (common-util/time-ms))))))
|
||||
|
||||
(defn hide!
|
||||
[]
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
(when-let [element (util/app-scroll-container-node)]
|
||||
(common-handler/listen-to-scroll! element))) [])
|
||||
[:div.mt-24.h-full
|
||||
(mobile-header/header tab login?)
|
||||
(mobile-header/header tab)
|
||||
(main-content tab)
|
||||
;; bottom tabs
|
||||
(when-not (mobile-util/native-ios?)
|
||||
|
||||
@@ -151,7 +151,6 @@
|
||||
skip? (and (= tab "home")
|
||||
(not= route-name :home))
|
||||
base {:title title
|
||||
:tintColor "#1f2937"
|
||||
:hidden (boolean hidden?)}
|
||||
left-buttons (when (= tab "home")
|
||||
[{:id "menu" :systemIcon "line.3.horizontal"}])
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
[]
|
||||
(let [[input set-input!] (mobile-state/use-search-input)
|
||||
[search-result set-search-result!] (hooks/use-state nil)
|
||||
[last-input-at set-last-input-at!] (hooks/use-state nil)
|
||||
[last-input-at _set-last-input-at!] (mobile-state/use-search-last-input-at)
|
||||
[recents set-recents!] (hooks/use-state (search-handler/get-recents))
|
||||
result search-result]
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
(defonce *search-input (atom ""))
|
||||
(defn use-search-input []
|
||||
(r/use-atom *search-input))
|
||||
(defonce *search-last-input-at (atom nil))
|
||||
(defn use-search-last-input-at []
|
||||
(r/use-atom *search-last-input-at))
|
||||
|
||||
(defonce *modal-blocks (atom []))
|
||||
(defonce *blocks-navigation-history (atom []))
|
||||
|
||||
Reference in New Issue
Block a user