1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-17 23:27:48 +02:00
This commit is contained in:
Laurent Cozic
2021-06-25 14:51:36 +01:00
parent 0d930128c4
commit 400ede122d
23 changed files with 426 additions and 176 deletions

View File

@@ -2,7 +2,7 @@ const React = require('react');
const { connect } = require('react-redux');
import Setting from '@joplin/lib/models/Setting';
import EncryptionService from '@joplin/lib/services/EncryptionService';
import { disableEncryption, generateMasterKeyAndEnableEncryption } from '@joplin/lib/services/e2ee/utils';
import { setupAndDisableEncryption, generateMasterKeyAndEnableEncryption } from '@joplin/lib/services/e2ee/utils';
import time from '@joplin/lib/time';
import shim from '@joplin/lib/shim';
import { themeStyle } from '@joplin/lib/theme';
@@ -180,7 +180,7 @@ class EncryptionConfigScreenComponent extends React.Component<Props, any> {
try {
if (isEnabled) {
await disableEncryption();
await setupAndDisableEncryption();
} else {
await generateMasterKeyAndEnableEncryption(EncryptionService.instance(), answer);
}