Merge pull request #4332 from vector-im/fix_secure_backup_banner

RecentsDataSource: Do not display secure backup banner when keys upload is in process
This commit is contained in:
SBiOSoftWhare
2021-05-17 16:40:52 +02:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ Changes to be released in next version
*
🐛 Bugfix
*
* RecentsDataSource: Do not display secure backup banner when keys upload is in process.
⚠️ API Changes
*
@@ -190,10 +190,13 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou
SecureBackupBannerPreferences *secureBackupBannersPreferences = SecureBackupBannerPreferences.shared;
// Display the banner if only we can set up 4S and if there are messages keys to backup
// and if there is no plan to upload keys yet
if (!secureBackupBannersPreferences.hideSetupBanner
&& [self.mxSession vc_canSetupSecureBackup]
&& self.mxSession.crypto.backup.hasKeysToBackup)
&& self.mxSession.crypto.backup.hasKeysToBackup
&& !self.mxSession.crypto.backup.enabled)
{
NSLog(@"[RecentsDataSource] updateSecureBackupBanner: Secure backup should be shown (crypto.backup.state = %lu)", (unsigned long)self.mxSession.crypto.backup.state);
secureBackupBanner = SecureBackupBannerDisplaySetup;
}
}