diff --git a/src/main/frontend/components/page_menu.cljs b/src/main/frontend/components/page_menu.cljs index f78efcd34..55b45a24c 100644 --- a/src/main/frontend/components/page_menu.cljs +++ b/src/main/frontend/components/page_menu.cljs @@ -103,7 +103,7 @@ :options {:on-click #(js/window.apis.openPath file-path)}}]) (when (or (util/electron?) - (mobile-util/native-ios?)) + (mobile-util/is-native-platform?)) {:title (t :page/copy-page-url) :options {:on-click #(util/copy-to-clipboard! (url-util/get-logseq-graph-page-url nil repo page-original-name))}}) diff --git a/src/main/frontend/mobile/deeplink.cljs b/src/main/frontend/mobile/deeplink.cljs index 24ea91414..4e8a62514 100644 --- a/src/main/frontend/mobile/deeplink.cljs +++ b/src/main/frontend/mobile/deeplink.cljs @@ -50,23 +50,26 @@ (reset! *link-to-another-graph true)) (notification/show! (str "Open graph failed. Graph `" graph-name "` doesn't exist.") :error false)))) - (js/setTimeout - (fn [] - (cond - page-name - (let [db-page-name (db-model/get-redirect-page-name page-name)] - (editor-handler/insert-first-page-block-if-not-exists! db-page-name)) + (when (or (= graph-name current-graph-name) + @*link-to-another-graph) + (js/setTimeout + (fn [] + (cond + page-name + (let [db-page-name (db-model/get-redirect-page-name page-name)] + (editor-handler/insert-first-page-block-if-not-exists! db-page-name)) - block-uuid - (if (db-model/get-block-by-uuid block-uuid) - (route-handler/redirect-to-page! block-uuid) - (notification/show! (str "Open link failed. Block-id `" block-uuid "` doesn't exist in the graph.") :error false)) + block-uuid + (if (db-model/get-block-by-uuid block-uuid) + (route-handler/redirect-to-page! block-uuid) + (notification/show! (str "Open link failed. Block-id `" block-uuid "` doesn't exist in the graph.") :error false)) - :else - nil)) - (if @*link-to-another-graph - 1000 - 0)))) + :else + nil) + (reset! *link-to-another-graph false)) + (if @*link-to-another-graph + 1000 + 0))))) (= hostname "shared") (let [result (into {} (map (fn [key]