Skip to content

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

mobile: fix pdf export on android (#1445)

Ammar Ahmed7bf01535c8dd
diff --git a/apps/mobile/app/components/properties/items.js b/apps/mobile/app/components/properties/items.js
index 9f3cd4847..2ef350b68 100644
--- a/apps/mobile/app/components/properties/items.js
+++ b/apps/mobile/app/components/properties/items.js
@@ -112,6 +112,7 @@ export const Items = ({ item, buttons, close }) => {
<FlatList
data={data}
keyExtractor={(item) => item.title}
+ key={columnItemsCount + "key"}
numColumns={columnItemsCount}
style={{
marginTop: item.type !== "note" ? 10 : 0,
diff --git a/apps/mobile/app/services/exporter.js b/apps/mobile/app/services/exporter.js
index d6a7f23f9..6f48d3ce7 100644
--- a/apps/mobile/app/services/exporter.js
+++ b/apps/mobile/app/services/exporter.js
@@ -390,7 +390,7 @@ async function save(path, data, fileName, extension) {
data,
fileName + `.${extension}`,
MIMETypes[extension],
- "utf8",
+ extension === "pdf" ? "base64" : "utf8",
false
);
await releasePermissions(path);