diff --git a/apps/mobile/app/common/filesystem/index.ts b/apps/mobile/app/common/filesystem/index.ts index 676ec46654..e236bbe3a6 100644 --- a/apps/mobile/app/common/filesystem/index.ts +++ b/apps/mobile/app/common/filesystem/index.ts @@ -47,7 +47,8 @@ export default { deleteCacheFileByPath, getCacheSize, requestPermission, - checkAndCreateDir + checkAndCreateDir, + getUploadedFileSize }; export const FileStorage: IFileStorage = { diff --git a/apps/mobile/app/components/dialog/base-dialog.tsx b/apps/mobile/app/components/dialog/base-dialog.tsx index f6be7ea6b1..0ffa62fb4a 100644 --- a/apps/mobile/app/components/dialog/base-dialog.tsx +++ b/apps/mobile/app/components/dialog/base-dialog.tsx @@ -38,7 +38,7 @@ import { useAppState } from "../../hooks/use-app-state"; export interface BaseDialogProps extends PropsWithChildren { animation?: "fade" | "none" | "slide" | undefined; - visible: boolean; + visible?: boolean; onRequestClose?: () => void; onShow?: () => void; premium?: boolean; diff --git a/apps/mobile/app/components/dialogs/color-picker/index.tsx b/apps/mobile/app/components/dialogs/color-picker/index.tsx index d6b29f2fde..734c7e3f0c 100644 --- a/apps/mobile/app/components/dialogs/color-picker/index.tsx +++ b/apps/mobile/app/components/dialogs/color-picker/index.tsx @@ -179,6 +179,7 @@ const ColorPicker = ({ title: title.current, colorCode: selectedColor }); + if (!id) return; useRelationStore.getState().update(); useMenuStore.getState().setColorNotes(); setVisible(false); diff --git a/apps/mobile/app/components/list/list-item.wrapper.tsx b/apps/mobile/app/components/list/list-item.wrapper.tsx index 209b00ee4f..aad1361706 100644 --- a/apps/mobile/app/components/list/list-item.wrapper.tsx +++ b/apps/mobile/app/components/list/list-item.wrapper.tsx @@ -297,7 +297,6 @@ function getDate(item: Item, groupType?: GroupingKey): number { groupType ? db.settings.getGroupOptions(groupType) : { - groupBy: "default", sortBy: "dateEdited", sortDirection: "desc" }, diff --git a/apps/mobile/app/components/premium/pricing-plans.tsx b/apps/mobile/app/components/premium/pricing-plans.tsx index a7ce08fd75..d0ef060da4 100644 --- a/apps/mobile/app/components/premium/pricing-plans.tsx +++ b/apps/mobile/app/components/premium/pricing-plans.tsx @@ -129,7 +129,10 @@ export const PricingPlans = ({ if (code.startsWith("com.streetwriters.notesnook")) { skuId = code; } else { - skuId = await db.offers?.getCode(code.split(":")[0], Platform.OS); + skuId = await db.offers?.getCode( + code.split(":")[0], + Platform.OS as "ios" | "android" + ); } const products = await PremiumService.getProducts(); diff --git a/apps/mobile/app/components/sheets/export-notes/share.js b/apps/mobile/app/components/sheets/export-notes/share.jsx similarity index 100% rename from apps/mobile/app/components/sheets/export-notes/share.js rename to apps/mobile/app/components/sheets/export-notes/share.jsx diff --git a/apps/mobile/app/components/sheets/publish-note/index.tsx b/apps/mobile/app/components/sheets/publish-note/index.tsx index 581d21cba6..042c7b6e76 100644 --- a/apps/mobile/app/components/sheets/publish-note/index.tsx +++ b/apps/mobile/app/components/sheets/publish-note/index.tsx @@ -150,7 +150,7 @@ const PublishNoteSheet = ({ ) : ( <> - {isPublished && ( + {isPublished && publishUrl ? ( - )} + ) : null} { diff --git a/apps/mobile/app/components/sheets/reminder/index.tsx b/apps/mobile/app/components/sheets/reminder/index.tsx index b100d0d687..f9669e2d74 100644 --- a/apps/mobile/app/components/sheets/reminder/index.tsx +++ b/apps/mobile/app/components/sheets/reminder/index.tsx @@ -556,9 +556,9 @@ export default function ReminderSheet({ {Object.keys(ReminderNotificationModes).map((mode) => (