diff --git a/src/app/features/config/default-global-config.const.ts b/src/app/features/config/default-global-config.const.ts index 908897a9f2e..a49077fa3e9 100644 --- a/src/app/features/config/default-global-config.const.ts +++ b/src/app/features/config/default-global-config.const.ts @@ -134,7 +134,8 @@ export const DEFAULT_GLOBAL_CONFIG: GlobalConfigState = { sync: { isEnabled: false, - isCompressionEnabled: true, + // TODO maybe enable later if it works well + isCompressionEnabled: false, syncProvider: null, syncInterval: minute, diff --git a/src/app/features/config/form-cfgs/sync-form.const.ts b/src/app/features/config/form-cfgs/sync-form.const.ts index b3f6ca9f3c8..0e860790f37 100644 --- a/src/app/features/config/form-cfgs/sync-form.const.ts +++ b/src/app/features/config/form-cfgs/sync-form.const.ts @@ -16,6 +16,13 @@ export const SYNC_FORM: ConfigFormSection = { label: T.F.SYNC.FORM.L_ENABLE_SYNCING, }, }, + { + key: 'isCompressionEnabled', + type: 'checkbox', + templateOptions: { + label: T.F.SYNC.FORM.L_ENABLE_COMPRESSION, + }, + }, { key: 'syncInterval', type: 'duration', @@ -77,13 +84,6 @@ export const SYNC_FORM: ConfigFormSection = { label: T.F.SYNC.FORM.GOOGLE.L_SYNC_FILE_NAME, }, }, - { - key: 'isCompressData', - type: 'checkbox', - templateOptions: { - label: T.F.SYNC.FORM.GOOGLE.L_IS_COMPRESS_DATA, - }, - }, ], }, { diff --git a/src/app/imex/sync/sync-provider.service.ts b/src/app/imex/sync/sync-provider.service.ts index 580086ea608..3bdf0fecb75 100644 --- a/src/app/imex/sync/sync-provider.service.ts +++ b/src/app/imex/sync/sync-provider.service.ts @@ -505,9 +505,8 @@ export class SyncProviderService { } private async _compressAppDataIfEnabled(data: AppDataComplete): Promise { - // const isCompressionEnabled = (await this.syncCfg$.pipe(first()).toPromise()) - // .isCompressionEnabled; - const isCompressionEnabled = true; + const isCompressionEnabled = (await this.syncCfg$.pipe(first()).toPromise()) + .isCompressionEnabled; return isCompressionEnabled ? this._compressionService.compressUTF16(JSON.stringify(data)) : JSON.stringify(data); diff --git a/src/app/t.const.ts b/src/app/t.const.ts index 24473e0c999..5184160d079 100644 --- a/src/app/t.const.ts +++ b/src/app/t.const.ts @@ -678,7 +678,6 @@ const T = { L_ACCESS_TOKEN: 'F.SYNC.FORM.DROPBOX.L_ACCESS_TOKEN', }, GOOGLE: { - L_IS_COMPRESS_DATA: 'F.SYNC.FORM.GOOGLE.L_IS_COMPRESS_DATA', L_SYNC_FILE_NAME: 'F.SYNC.FORM.GOOGLE.L_SYNC_FILE_NAME', }, LOCAL_FILE: { @@ -687,6 +686,7 @@ const T = { 'F.SYNC.FORM.LOCAL_FILE.L_SYNC_FILE_PATH_DESCRIPTION', }, L_ENABLE_SYNCING: 'F.SYNC.FORM.L_ENABLE_SYNCING', + L_ENABLE_COMPRESSION: 'F.SYNC.FORM.L_ENABLE_COMPRESSION', L_SYNC_INTERVAL: 'F.SYNC.FORM.L_SYNC_INTERVAL', L_SYNC_PROVIDER: 'F.SYNC.FORM.L_SYNC_PROVIDER', TITLE: 'F.SYNC.FORM.TITLE', diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 69adf28be56..923299be37a 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -669,7 +669,6 @@ "L_ACCESS_TOKEN": "Access Token (generated from Auth Code)" }, "GOOGLE": { - "L_IS_COMPRESS_DATA": "Compress data", "L_SYNC_FILE_NAME": "Sync File Name" }, "LOCAL_FILE": { @@ -677,6 +676,7 @@ "L_SYNC_FILE_PATH_DESCRIPTION": "Absolute path to the file that should be used for syncing (will be created)." }, "L_ENABLE_SYNCING": "Enable Syncing", + "L_ENABLE_COMPRESSION": "Enable Compression (faster data transfer)", "L_SYNC_INTERVAL": "Sync Interval", "L_SYNC_PROVIDER": "Sync Provider", "TITLE": "Sync",