Remove network status indicator from settings

pull/14/head
Niels Andriesse 6 years ago
parent 94e7cefbd9
commit c3fe7fba50

@ -136,39 +136,42 @@
[weakSelf showAdvanced]; [weakSelf showAdvanced];
}]]; }]];
} else { } else {
[section addItem:[OWSTableItem // Loki: Original code
itemWithCustomCellBlock:^{ // ========
UITableViewCell *cell = [OWSTableItem newCell]; // [section addItem:[OWSTableItem
cell.textLabel.text = NSLocalizedString(@"NETWORK_STATUS_HEADER", @""); // itemWithCustomCellBlock:^{
cell.selectionStyle = UITableViewCellSelectionStyleNone; // UITableViewCell *cell = [OWSTableItem newCell];
UILabel *accessoryLabel = [UILabel new]; // cell.textLabel.text = NSLocalizedString(@"NETWORK_STATUS_HEADER", @"");
if (TSAccountManager.sharedInstance.isDeregistered) { // cell.selectionStyle = UITableViewCellSelectionStyleNone;
accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_DEREGISTERED", // UILabel *accessoryLabel = [UILabel new];
@"Error indicating that this device is no longer registered."); // if (TSAccountManager.sharedInstance.isDeregistered) {
accessoryLabel.textColor = [UIColor ows_redColor]; // accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_DEREGISTERED",
} else { // @"Error indicating that this device is no longer registered.");
switch (TSSocketManager.shared.highestSocketState) { // accessoryLabel.textColor = [UIColor ows_redColor];
case OWSWebSocketStateClosed: // } else {
accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_OFFLINE", @""); // switch (TSSocketManager.shared.highestSocketState) {
accessoryLabel.textColor = [UIColor ows_redColor]; // case OWSWebSocketStateClosed:
break; // accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_OFFLINE", @"");
case OWSWebSocketStateConnecting: // accessoryLabel.textColor = [UIColor ows_redColor];
accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTING", @""); // break;
accessoryLabel.textColor = [UIColor ows_yellowColor]; // case OWSWebSocketStateConnecting:
break; // accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTING", @"");
case OWSWebSocketStateOpen: // accessoryLabel.textColor = [UIColor ows_yellowColor];
accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTED", @""); // break;
accessoryLabel.textColor = [UIColor ows_greenColor]; // case OWSWebSocketStateOpen:
break; // accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTED", @"");
} // accessoryLabel.textColor = [UIColor ows_greenColor];
} // break;
[accessoryLabel sizeToFit]; // }
cell.accessoryView = accessoryLabel; // }
cell.accessibilityIdentifier // [accessoryLabel sizeToFit];
= ACCESSIBILITY_IDENTIFIER_WITH_NAME(AppSettingsViewController, @"network_status"); // cell.accessoryView = accessoryLabel;
return cell; // cell.accessibilityIdentifier
} // = ACCESSIBILITY_IDENTIFIER_WITH_NAME(AppSettingsViewController, @"network_status");
actionBlock:nil]]; // return cell;
// }
// actionBlock:nil]];
// ========
} }
[section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_INVITE_TITLE", [section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_INVITE_TITLE",

Loading…
Cancel
Save