mobile: fix build

This commit is contained in:
Ammar Ahmed
2025-07-15 12:43:46 +05:00
committed by Abdullah Atta
parent 9bc8bddc12
commit e513081010
3 changed files with 14 additions and 3 deletions

View File

@@ -80,6 +80,7 @@ import { EditorMessage, EditorProps, useEditorType } from "./types";
import { useTabStore } from "./use-tab-store";
import { editorState, openInternalLink } from "./utils";
import AddReminder from "../../add-reminder";
import { useAreFeaturesAvailable } from "@notesnook/common";
const publishNote = async () => {
const user = useUserStore.getState().user;
@@ -148,6 +149,11 @@ export const useEditorEvents = (
editor: useEditorType,
{ readonly: editorPropReadonly, noHeader, noToolbar }: Partial<EditorProps>
) => {
const features = useAreFeaturesAvailable([
"callout",
"outlineList",
"taskList"
]);
const deviceMode = useSettingStore((state) => state.deviceMode);
const fullscreen = useSettingStore((state) => state.fullscreen);
const corsProxy = useSettingStore((state) => state.settings.corsProxy);
@@ -216,7 +222,8 @@ export const useEditorEvents = (
dateFormat: db.settings?.getDateFormat(),
timeFormat: db.settings?.getTimeFormat(),
fontScale,
markdownShortcuts
markdownShortcuts,
features
});
}, [
fullscreen,
@@ -235,7 +242,8 @@ export const useEditorEvents = (
timeFormat,
loading,
fontScale,
markdownShortcuts
markdownShortcuts,
features
]);
const onBackPress = useCallback(async () => {

View File

@@ -111,7 +111,9 @@ const Tiptap = ({
usePermissionHandler({
claims: {
premium: settings.premium
callout: !!settings.features?.callout?.isAllowed,
outlineList: !!settings.features?.outlineList?.isAllowed,
taskList: !!settings.features?.taskList?.isAllowed
},
onPermissionDenied: () => {
post(EditorEvents.pro, undefined, tabRef.current.id, tab.session?.noteId);

View File

@@ -52,6 +52,7 @@ export type Settings = {
dateFormat: string;
fontScale: number;
markdownShortcuts: boolean;
features: Record<any, any>;
};
/* eslint-disable no-var */