1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #7933: Don't display "obsolete encryption method" message if the key is disabled (#8025)

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
GitStart 2023-05-29 11:27:53 +01:00 committed by GitHub
parent 03424f76ea
commit 12bba9da29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -866,6 +866,7 @@ class MainScreenComponent extends React.Component<Props, State> {
const mapStateToProps = (state: AppState) => {
const syncInfo = localSyncInfoFromState(state);
const showNeedUpgradingEnabledMasterKeyMessage = !!EncryptionService.instance().masterKeysThatNeedUpgrading(syncInfo.masterKeys.filter((k) => !!k.enabled)).length;
return {
themeId: state.settings.theme,
@ -873,7 +874,7 @@ const mapStateToProps = (state: AppState) => {
hasDisabledSyncItems: state.hasDisabledSyncItems,
hasDisabledEncryptionItems: state.hasDisabledEncryptionItems,
showMissingMasterKeyMessage: showMissingMasterKeyMessage(syncInfo, state.notLoadedMasterKeys),
showNeedUpgradingMasterKeyMessage: !!EncryptionService.instance().masterKeysThatNeedUpgrading(syncInfo.masterKeys).length,
showNeedUpgradingMasterKeyMessage: showNeedUpgradingEnabledMasterKeyMessage,
showShouldReencryptMessage: state.settings['encryption.shouldReencrypt'] >= Setting.SHOULD_REENCRYPT_YES,
shouldUpgradeSyncTarget: state.settings['sync.upgradeState'] === Setting.SYNC_UPGRADE_STATE_SHOULD_DO,
pluginsLegacy: state.pluginsLegacy,