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

Mobile: Fixes #8381: Show warning if some items could not be decrypted (#8481)

This commit is contained in:
Henry Heino 2023-07-17 04:12:42 -07:00 committed by GitHub
parent 58e5b83648
commit 2f8275be8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,7 @@ interface ScreenHeaderProps {
historyCanGoBack?: boolean;
showMissingMasterKeyMessage?: boolean;
hasDisabledSyncItems?: boolean;
hasDisabledEncryptionItems?: boolean;
shouldUpgradeSyncTarget?: boolean;
showShouldUpgradeSyncTargetMessage?: boolean;
@ -563,6 +564,10 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
if (this.props.hasDisabledSyncItems) warningComps.push(this.renderWarningBox('Status', _('Some items cannot be synchronised. Press for more info.')));
if (this.props.shouldUpgradeSyncTarget && this.props.showShouldUpgradeSyncTargetMessage !== false) warningComps.push(this.renderWarningBox('UpgradeSyncTarget', _('The sync target needs to be upgraded. Press this banner to proceed.')));
if (this.props.hasDisabledEncryptionItems) {
warningComps.push(this.renderWarningBox('Status', _('Some items cannot be decrypted.')));
}
const showSideMenuButton = !!this.props.showSideMenuButton && !this.props.noteSelectionEnabled;
const showSelectAllButton = this.props.noteSelectionEnabled;
const showSearchButton = !!this.props.showSearchButton && !this.props.noteSelectionEnabled;
@ -649,6 +654,7 @@ const ScreenHeader = connect((state: State) => {
locale: state.settings.locale,
folders: state.folders,
themeId: state.settings.theme,
hasDisabledEncryptionItems: state.hasDisabledEncryptionItems,
noteSelectionEnabled: state.noteSelectionEnabled,
selectedNoteIds: state.selectedNoteIds,
showMissingMasterKeyMessage: showMissingMasterKeyMessage(syncInfo, state.notLoadedMasterKeys),