mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
feat: disable compression
This commit is contained in:
@@ -24,10 +24,6 @@ class Collector {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldCompress(itemType) {
|
|
||||||
return itemType === "tiny";
|
|
||||||
}
|
|
||||||
|
|
||||||
async collect(lastSyncedTimestamp, force) {
|
async collect(lastSyncedTimestamp, force) {
|
||||||
this._lastSyncedTimestamp = lastSyncedTimestamp;
|
this._lastSyncedTimestamp = lastSyncedTimestamp;
|
||||||
this.key = await this._db.user.getEncryptionKey();
|
this.key = await this._db.user.getEncryptionKey();
|
||||||
@@ -44,11 +40,7 @@ class Collector {
|
|||||||
|
|
||||||
_serialize(item) {
|
_serialize(item) {
|
||||||
if (!item) return;
|
if (!item) return;
|
||||||
return this._db.context.encrypt(
|
return this._db.context.encrypt(this.key, JSON.stringify(item));
|
||||||
this.key,
|
|
||||||
JSON.stringify(item),
|
|
||||||
this.shouldCompress(item.type)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_collect(array) {
|
_collect(array) {
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ export default class Storage {
|
|||||||
return this.storage.getAllKeys();
|
return this.storage.getAllKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
encrypt(password, data, compress) {
|
encrypt(password, data) {
|
||||||
return this.storage.encrypt(password, data, compress);
|
return this.storage.encrypt(password, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
decrypt(password, cipher) {
|
decrypt(password, cipher) {
|
||||||
|
|||||||
Reference in New Issue
Block a user