Compare commits

...

1 Commits

Author SHA1 Message Date
Ammar Ahmed
610e0d8b81 mobile: fix pdf-preview crash 2024-11-23 12:23:17 +05:00
3 changed files with 8 additions and 4 deletions

View File

@@ -188,7 +188,7 @@ const PDFPreview = () => {
}}
color={colors.static.white}
>
{strings.loadingWithProgress(progress.percent)}
{strings.loadingWithProgress(progress?.percent)}
</Paragraph>
</Animated.View>
) : (

View File

@@ -29,6 +29,7 @@ import { useAttachmentProgress } from "../../hooks/use-attachment-progress";
import { useDBItem } from "../../hooks/use-db-item";
import { useAttachmentStore } from "../../stores/use-attachment-store";
import { SIZE } from "../../utils/size";
import { strings } from "@notesnook/intl";
export const AttachmentGroupProgress = (props: { groupId?: string }) => {
const { colors } = useThemeColors();
@@ -90,11 +91,12 @@ export const AttachmentGroupProgress = (props: { groupId?: string }) => {
}}
numberOfLines={1}
>
Downloading {file?.filename} {formatBytes(file?.size || 0)}{" "}
{strings.downloading()} {file?.filename}{" "}
{formatBytes(file?.size || 0)}{" "}
{fileProgress?.percent ? `(${fileProgress.percent})` : ""}
</Paragraph>
<Paragraph size={10} color={colors.secondary.paragraph}>
Group: {props.groupId}
{strings.group()}: {props.groupId}
</Paragraph>
</View>
{props.groupId === "offline-mode" ? null : (

View File

@@ -1166,7 +1166,9 @@ export const settingsGroups: SettingSection[] = [
type: "component",
hidden: () => !useUserStore.getState().user,
name: strings.automaticBackupsWithAttachments(),
description: strings.automaticBackupsWithAttachmentsDesc(),
description: [
...strings.automaticBackupsWithAttachmentsDesc()
].join("\n"),
component: "autobackupsattachments"
},
{