Indicate if censorship circumvention is active in the main app settings view.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 320dfd89e3
commit 1dffdb5ca0

@ -75,6 +75,13 @@
[self updateTableContents]; [self updateTableContents];
} }
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self updateTableContents];
}
- (void)dealloc { - (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];
} }
@ -120,10 +127,19 @@
} }
customRowHeight:96.f customRowHeight:96.f
actionBlock:nil]]; actionBlock:nil]];
if (OWSSignalService.sharedInstance.isCensorshipCircumventionActive) {
[section
addItem:[OWSTableItem disclosureItemWithText:
NSLocalizedString(@"NETWORK_STATUS_CENSORSHIP_CIRCUMVENTION_ACTIVE",
@"Indicates to the user that censorship circumvention has been activated.")
actionBlock:^{
[weakSelf showAdvanced];
}]];
} else {
[section addItem:[OWSTableItem itemWithCustomCellBlock:^{ [section addItem:[OWSTableItem itemWithCustomCellBlock:^{
UITableViewCell *cell = [UITableViewCell new]; UITableViewCell *cell = [UITableViewCell new];
cell.textLabel.text = NSLocalizedString( cell.textLabel.text = NSLocalizedString(@"NETWORK_STATUS_HEADER", @"");
@"NETWORK_STATUS_HEADER", @"");
cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f]; cell.textLabel.font = [UIFont ows_regularFontWithSize:18.f];
cell.textLabel.textColor = [UIColor blackColor]; cell.textLabel.textColor = [UIColor blackColor];
@ -151,6 +167,7 @@
[OWSAlerts showAlertWithTitle:NSLocalizedString(@"NETWORK_STATUS_HEADER", @"") [OWSAlerts showAlertWithTitle:NSLocalizedString(@"NETWORK_STATUS_HEADER", @"")
message:NSLocalizedString(@"NETWORK_STATUS_TEXT", @"")]; message:NSLocalizedString(@"NETWORK_STATUS_TEXT", @"")];
}]]; }]];
}
[section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_INVITE_TITLE", [section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_INVITE_TITLE",
@"Settings table view cell label") @"Settings table view cell label")
actionBlock:^{ actionBlock:^{

@ -792,6 +792,9 @@
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"NETWORK_ERROR_RECOVERY" = "Please check you're online and try again."; "NETWORK_ERROR_RECOVERY" = "Please check you're online and try again.";
/* Indicates to the user that censorship circumvention has been activated. */
"NETWORK_STATUS_CENSORSHIP_CIRCUMVENTION_ACTIVE" = "Censorship Circumvention: On";
/* No comment provided by engineer. */ /* No comment provided by engineer. */
"NETWORK_STATUS_CONNECTED" = "Connected"; "NETWORK_STATUS_CONNECTED" = "Connected";

Loading…
Cancel
Save