From e7fb39b0ffaa2756b4c7ece4c384227bff68690d Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Wed, 4 Jun 2025 08:50:26 +0800 Subject: [PATCH] fix: keep using shui popup for editor commands --- src/main/capacitor/components/popup.cljs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/capacitor/components/popup.cljs b/src/main/capacitor/components/popup.cljs index d74b12e2d0..46ed20d9f1 100644 --- a/src/main/capacitor/components/popup.cljs +++ b/src/main/capacitor/components/popup.cljs @@ -1,15 +1,18 @@ (ns capacitor.components.popup (:require [capacitor.ionic :as ion] [capacitor.state :as state] + [logseq.shui.popup.core :as shui-popup] [logseq.shui.ui :as shui] [rum.core :as rum])) (defn popup-show! - [_event content-fn opts] - (when (fn? content-fn) - (state/set-popup! {:open? true - :content-fn content-fn - :opts opts}))) + [event content-fn {:keys [id] :as opts}] + (if (and (keyword? id) (= "editor.commands" (namespace id))) + (shui-popup/show! event content-fn opts) + (when (fn? content-fn) + (state/set-popup! {:open? true + :content-fn content-fn + :opts opts})))) (set! shui/popup-show! popup-show!)