mobile: fix properties not opening

This commit is contained in:
Ammar Ahmed
2025-03-03 12:16:54 +05:00
committed by Abdullah Atta
parent dfd0dc72b8
commit 6644940115

View File

@@ -78,6 +78,7 @@ import { useDragState } from "../../settings/editor/state";
import { EditorMessage, EditorProps, useEditorType } from "./types";
import { useTabStore } from "./use-tab-store";
import { editorState, openInternalLink } from "./utils";
import { Properties } from "../../../components/properties";
const publishNote = async () => {
const user = useUserStore.getState().user;
@@ -129,12 +130,9 @@ const showActionsheet = async () => {
.getState()
.getNoteIdForTab(useTabStore.getState().currentTab!);
if (noteId) {
console.log("OPEN NOTE");
const note = await db.notes?.note(noteId);
if (editorState().isFocused || editorState().isFocused) {
editorState().isFocused = true;
}
const { Properties } = require("../../../components/properties/index.js");
Properties.present(note, ["Dark Mode"]);
Properties.present(note, false);
} else {
ToastManager.show({
heading: strings.noNoteProperties(),