Skip to content

Commit

Permalink
fix: don't show mobile toobar on PC
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed May 23, 2022
1 parent cdc4f8b commit 276bfc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/main/frontend/mobile/footer.cljs
Expand Up @@ -46,7 +46,8 @@

(rum/defc footer < rum/reactive
[]
(when (and (state/sub :mobile/show-tabbar?)
(when (and (state/mobile?)
(state/sub :mobile/show-tabbar?)
(state/get-current-repo))
[:div.cp__footer.w-full.bottom-0.justify-between
(audio-record-cp)
Expand Down
10 changes: 7 additions & 3 deletions src/main/frontend/state.cljs
Expand Up @@ -58,7 +58,7 @@
:modal/close-btn? nil
:modal/subsets []


;; right sidebar
:ui/fullscreen? false
:ui/settings-open? false
Expand Down Expand Up @@ -147,7 +147,7 @@
:mobile/show-toolbar? false
;;; toolbar icon doesn't update correctly when clicking after separate it from box,
;;; add a random in (<= 1000000) to observer its update
:mobile/toolbar-update-observer 0
:mobile/toolbar-update-observer 0
:mobile/show-tabbar? false

;; plugin
Expand Down Expand Up @@ -1190,9 +1190,13 @@
(set-state! :ui/shortcut-tooltip? (not mode))
(storage/set :ui/shortcut-tooltip? (not mode))))

(defn mobile?
[]
(or (util/mobile?) (mobile-util/native-platform?)))

(defn enable-tooltip?
[]
(if (or (util/mobile?) (mobile-util/native-platform?))
(if (mobile?)
false
(get (get (sub-config) (get-current-repo))
:ui/enable-tooltip?
Expand Down

0 comments on commit 276bfc7

Please sign in to comment.