From 12bba9da29989930514bede3f5a3f4236dd83b6e Mon Sep 17 00:00:00 2001 From: GitStart <1501599+gitstart@users.noreply.github.com> Date: Mon, 29 May 2023 11:27:53 +0100 Subject: [PATCH] Desktop: Fixes #7933: Don't display "obsolete encryption method" message if the key is disabled (#8025) Co-authored-by: Laurent Cozic --- packages/app-desktop/gui/MainScreen/MainScreen.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/app-desktop/gui/MainScreen/MainScreen.tsx b/packages/app-desktop/gui/MainScreen/MainScreen.tsx index bfe8d1fbb..1aaba3715 100644 --- a/packages/app-desktop/gui/MainScreen/MainScreen.tsx +++ b/packages/app-desktop/gui/MainScreen/MainScreen.tsx @@ -866,6 +866,7 @@ class MainScreenComponent extends React.Component { 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,