|
|
@ -89,16 +89,21 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
OWSTableSection *loggingSection = [OWSTableSection new];
|
|
|
|
OWSTableSection *loggingSection = [OWSTableSection new];
|
|
|
|
loggingSection.headerTitle = NSLocalizedString(@"LOGGING_SECTION", nil);
|
|
|
|
loggingSection.headerTitle = NSLocalizedString(@"LOGGING_SECTION", nil);
|
|
|
|
[loggingSection addItem:[OWSTableItem switchItemWithText:NSLocalizedString(@"SETTINGS_ADVANCED_DEBUGLOG", @"")
|
|
|
|
[loggingSection addItem:[OWSTableItem switchItemWithText:NSLocalizedString(@"SETTINGS_ADVANCED_DEBUGLOG", @"")
|
|
|
|
isOnBlock:^{
|
|
|
|
accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, @"enable_debug_log")
|
|
|
|
return [OWSPreferences isLoggingEnabled];
|
|
|
|
isOnBlock:^{
|
|
|
|
}
|
|
|
|
return [OWSPreferences isLoggingEnabled];
|
|
|
|
target:weakSelf
|
|
|
|
}
|
|
|
|
selector:@selector(didToggleEnableLogSwitch:)]];
|
|
|
|
isEnabledBlock:^{
|
|
|
|
|
|
|
|
return YES;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
target:weakSelf
|
|
|
|
|
|
|
|
selector:@selector(didToggleEnableLogSwitch:)]];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ([OWSPreferences isLoggingEnabled]) {
|
|
|
|
if ([OWSPreferences isLoggingEnabled]) {
|
|
|
|
[loggingSection
|
|
|
|
[loggingSection
|
|
|
|
addItem:[OWSTableItem actionItemWithText:NSLocalizedString(@"SETTINGS_ADVANCED_SUBMIT_DEBUGLOG", @"")
|
|
|
|
addItem:[OWSTableItem actionItemWithText:NSLocalizedString(@"SETTINGS_ADVANCED_SUBMIT_DEBUGLOG", @"")
|
|
|
|
|
|
|
|
accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, @"submit_debug_log")
|
|
|
|
actionBlock:^{
|
|
|
|
actionBlock:^{
|
|
|
|
OWSLogInfo(@"Submitting debug logs");
|
|
|
|
OWSLogInfo(@"Submitting debug logs");
|
|
|
|
[DDLog flushLog];
|
|
|
|
[DDLog flushLog];
|
|
|
@ -112,6 +117,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
pushNotificationsSection.headerTitle
|
|
|
|
pushNotificationsSection.headerTitle
|
|
|
|
= NSLocalizedString(@"PUSH_REGISTER_TITLE", @"Used in table section header and alert view title contexts");
|
|
|
|
= NSLocalizedString(@"PUSH_REGISTER_TITLE", @"Used in table section header and alert view title contexts");
|
|
|
|
[pushNotificationsSection addItem:[OWSTableItem actionItemWithText:NSLocalizedString(@"REREGISTER_FOR_PUSH", nil)
|
|
|
|
[pushNotificationsSection addItem:[OWSTableItem actionItemWithText:NSLocalizedString(@"REREGISTER_FOR_PUSH", nil)
|
|
|
|
|
|
|
|
accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER(
|
|
|
|
|
|
|
|
self, @"reregister_push_notifications")
|
|
|
|
actionBlock:^{
|
|
|
|
actionBlock:^{
|
|
|
|
[weakSelf syncPushTokens];
|
|
|
|
[weakSelf syncPushTokens];
|
|
|
|
}]];
|
|
|
|
}]];
|
|
|
@ -180,6 +187,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
[censorshipSection
|
|
|
|
[censorshipSection
|
|
|
|
addItem:[OWSTableItem switchItemWithText:NSLocalizedString(@"SETTINGS_ADVANCED_CENSORSHIP_CIRCUMVENTION",
|
|
|
|
addItem:[OWSTableItem switchItemWithText:NSLocalizedString(@"SETTINGS_ADVANCED_CENSORSHIP_CIRCUMVENTION",
|
|
|
|
@"Label for the 'manual censorship circumvention' switch.")
|
|
|
|
@"Label for the 'manual censorship circumvention' switch.")
|
|
|
|
|
|
|
|
accessibilityIdentifier:SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, @"censorship_circumvention")
|
|
|
|
isOnBlock:isCensorshipCircumventionOnBlock
|
|
|
|
isOnBlock:isCensorshipCircumventionOnBlock
|
|
|
|
isEnabledBlock:isManualCensorshipCircumventionOnEnabledBlock
|
|
|
|
isEnabledBlock:isManualCensorshipCircumventionOnEnabledBlock
|
|
|
|
target:weakSelf
|
|
|
|
target:weakSelf
|
|
|
|