mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +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) {
|
||||
this._lastSyncedTimestamp = lastSyncedTimestamp;
|
||||
this.key = await this._db.user.getEncryptionKey();
|
||||
@@ -44,11 +40,7 @@ class Collector {
|
||||
|
||||
_serialize(item) {
|
||||
if (!item) return;
|
||||
return this._db.context.encrypt(
|
||||
this.key,
|
||||
JSON.stringify(item),
|
||||
this.shouldCompress(item.type)
|
||||
);
|
||||
return this._db.context.encrypt(this.key, JSON.stringify(item));
|
||||
}
|
||||
|
||||
_collect(array) {
|
||||
|
||||
@@ -27,8 +27,8 @@ export default class Storage {
|
||||
return this.storage.getAllKeys();
|
||||
}
|
||||
|
||||
encrypt(password, data, compress) {
|
||||
return this.storage.encrypt(password, data, compress);
|
||||
encrypt(password, data) {
|
||||
return this.storage.encrypt(password, data);
|
||||
}
|
||||
|
||||
decrypt(password, cipher) {
|
||||
|
||||
Reference in New Issue
Block a user