fix header icons display when `:custom-default-page` non-nils

fix #5695
pull/5716/head^2
llcc 2022-06-15 19:32:13 +08:00 committed by Tienson Qin
parent 3cac7d8f40
commit 7bab4469a6
1 changed files with 8 additions and 5 deletions

View File

@ -229,9 +229,11 @@
(not (mobile-util/native-platform?))
(not config/publishing?))
left-menu (left-menu-button {:on-click (fn []
(open-fn)
(state/set-left-sidebar-open!
(not (:ui/left-sidebar-open? @state/state))))})]
(open-fn)
(state/set-left-sidebar-open!
(not (:ui/left-sidebar-open? @state/state))))})
custom-home-page? (and (state/custom-home-page?)
(= (state/sub-default-home-page) (state/get-current-page)))]
[:div.cp__header#head
{:class (util/classnames [{:electron-mac electron-mac?
:native-ios (mobile-util/native-ios?)
@ -254,7 +256,7 @@
(state/pub-event! [:go/search]))}
(ui/icon "search" {:style {:fontSize ui/icon-size}})]))])
(when (mobile-util/native-platform?)
(if (state/home?)
(if (or (state/home?) custom-home-page?)
left-menu
(ui/with-shortcut :go/backward "bottom"
[:button.it.navigation.nav-left.button.icon
@ -269,7 +271,8 @@
(when plugin-handler/lsp-enabled?
(plugins/hook-ui-items :toolbar))
(when (not= (state/get-current-route) :home)
(when (and (not= (state/get-current-route) :home)
(not custom-home-page?))
(home-button))
(when (util/electron?)