enhance(mobile): redirect to journals tab when switched graph

This commit is contained in:
charlie
2025-06-26 15:33:54 +08:00
parent b68c305872
commit 586c72647b
3 changed files with 15 additions and 5 deletions

View File

@@ -34,6 +34,7 @@
[frontend.mobile.util :as mobile-util]
[frontend.modules.instrumentation.sentry :as sentry-event]
[frontend.state :as state]
[capacitor.state :as cc-state]
[frontend.ui :as ui]
[frontend.util :as util]
[goog.dom :as gdom]
@@ -86,7 +87,9 @@
{:id :https-proxy-panel :center? true :class "lg:max-w-2xl"}))
(defmethod events/handle :redirect-to-home [_]
(page-handler/create-today-journal!))
(page-handler/create-today-journal!)
(when (util/capacitor-new?)
(cc-state/redirect-to-tab! "home")))
(defmethod events/handle :page/show-delete-dialog [[_ selected-rows ok-handler]]
(shui/dialog-open!