Merge branch 'charlesmchen/explicitBackupFeatureFlag' into release/2.32.0
This commit is contained in:
commit
151b339339
|
@ -193,20 +193,8 @@
|
|||
actionBlock:^{
|
||||
[weakSelf showAdvanced];
|
||||
}]];
|
||||
// Show backup UI in debug builds OR if backup has already been enabled.
|
||||
//
|
||||
// NOTE: Backup format is not yet finalized and backups are not yet
|
||||
// properly encrypted, so these debug backups should only be
|
||||
// done on test devices and will not be usable if/when we ship
|
||||
// backup to production.
|
||||
//
|
||||
// TODO: Always show backup when we go to production.
|
||||
BOOL isBackupEnabled = [OWSBackup.sharedManager isBackupEnabled];
|
||||
BOOL showBackup = isBackupEnabled;
|
||||
SUPPRESS_DEADSTORE_WARNING(showBackup);
|
||||
#ifdef DEBUG
|
||||
showBackup = YES;
|
||||
#endif
|
||||
BOOL showBackup = (OWSBackup.isFeatureEnabled && isBackupEnabled);
|
||||
if (showBackup) {
|
||||
[section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_BACKUP",
|
||||
@"Label for the backup view in app settings.")
|
||||
|
|
|
@ -44,6 +44,8 @@ typedef NS_ENUM(NSUInteger, OWSBackupState) {
|
|||
@property (nonatomic, readonly, nullable) NSString *backupExportDescription;
|
||||
@property (nonatomic, readonly, nullable) NSNumber *backupExportProgress;
|
||||
|
||||
+ (BOOL)isFeatureEnabled;
|
||||
|
||||
- (BOOL)isBackupEnabled;
|
||||
- (void)setIsBackupEnabled:(BOOL)value;
|
||||
|
||||
|
|
|
@ -107,6 +107,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
});
|
||||
}
|
||||
|
||||
+ (BOOL)isFeatureEnabled
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark - Backup Export
|
||||
|
||||
- (void)tryToExportBackup
|
||||
|
@ -251,6 +256,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
{
|
||||
OWSAssertIsOnMainThread();
|
||||
|
||||
if (!OWSBackup.isFeatureEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Start or abort a backup export if neccessary.
|
||||
if (!self.shouldHaveBackupExport && self.backupExportJob) {
|
||||
[self.backupExportJob cancel];
|
||||
|
|
Loading…
Reference in New Issue