Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: fix core api usage

Ammar Ahmed6373cbc9a43f
diff --git a/apps/mobile/app/common/database/index.js b/apps/mobile/app/common/database/index.js
index 673cc7710..9224b558f 100644
--- a/apps/mobile/app/common/database/index.js
+++ b/apps/mobile/app/common/database/index.js
@@ -54,10 +54,10 @@ export async function setupDatabase(password) {
storage: Storage,
eventsource: Platform.OS === "ios" ? EventSource : AndroidEventSource,
fs: filesystem,
- compressor: {
+ compressor: () => ({
compress: Gzip.deflate,
decompress: Gzip.inflate
- },
+ }),
batchSize: 100,
sqliteOptions: {
dialect: (name) => ({
diff --git a/apps/mobile/app/common/filesystem/download-attachment.js b/apps/mobile/app/common/filesystem/download-attachment.js
index 8fd524825..4893c282f 100644
--- a/apps/mobile/app/common/filesystem/download-attachment.js
+++ b/apps/mobile/app/common/filesystem/download-attachment.js
@@ -244,7 +244,7 @@ export default async function downloadAttachment(
);
}
- let filename = getFileNameWithExtension(
+ let filename = await getFileNameWithExtension(
attachment.filename,
attachment.mimeType
);