From c3fe7fba5041d902618f37ea1917b0c85143e414 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Tue, 14 May 2019 14:20:04 +1000 Subject: [PATCH] Remove network status indicator from settings --- .../AppSettings/AppSettingsViewController.m | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m b/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m index b1a9c6375..8a55a5f43 100644 --- a/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m +++ b/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m @@ -136,39 +136,42 @@ [weakSelf showAdvanced]; }]]; } else { - [section addItem:[OWSTableItem - itemWithCustomCellBlock:^{ - UITableViewCell *cell = [OWSTableItem newCell]; - cell.textLabel.text = NSLocalizedString(@"NETWORK_STATUS_HEADER", @""); - cell.selectionStyle = UITableViewCellSelectionStyleNone; - UILabel *accessoryLabel = [UILabel new]; - if (TSAccountManager.sharedInstance.isDeregistered) { - accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_DEREGISTERED", - @"Error indicating that this device is no longer registered."); - accessoryLabel.textColor = [UIColor ows_redColor]; - } else { - switch (TSSocketManager.shared.highestSocketState) { - case OWSWebSocketStateClosed: - accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_OFFLINE", @""); - accessoryLabel.textColor = [UIColor ows_redColor]; - break; - case OWSWebSocketStateConnecting: - accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTING", @""); - accessoryLabel.textColor = [UIColor ows_yellowColor]; - break; - case OWSWebSocketStateOpen: - accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTED", @""); - accessoryLabel.textColor = [UIColor ows_greenColor]; - break; - } - } - [accessoryLabel sizeToFit]; - cell.accessoryView = accessoryLabel; - cell.accessibilityIdentifier - = ACCESSIBILITY_IDENTIFIER_WITH_NAME(AppSettingsViewController, @"network_status"); - return cell; - } - actionBlock:nil]]; + // Loki: Original code + // ======== +// [section addItem:[OWSTableItem +// itemWithCustomCellBlock:^{ +// UITableViewCell *cell = [OWSTableItem newCell]; +// cell.textLabel.text = NSLocalizedString(@"NETWORK_STATUS_HEADER", @""); +// cell.selectionStyle = UITableViewCellSelectionStyleNone; +// UILabel *accessoryLabel = [UILabel new]; +// if (TSAccountManager.sharedInstance.isDeregistered) { +// accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_DEREGISTERED", +// @"Error indicating that this device is no longer registered."); +// accessoryLabel.textColor = [UIColor ows_redColor]; +// } else { +// switch (TSSocketManager.shared.highestSocketState) { +// case OWSWebSocketStateClosed: +// accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_OFFLINE", @""); +// accessoryLabel.textColor = [UIColor ows_redColor]; +// break; +// case OWSWebSocketStateConnecting: +// accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTING", @""); +// accessoryLabel.textColor = [UIColor ows_yellowColor]; +// break; +// case OWSWebSocketStateOpen: +// accessoryLabel.text = NSLocalizedString(@"NETWORK_STATUS_CONNECTED", @""); +// accessoryLabel.textColor = [UIColor ows_greenColor]; +// break; +// } +// } +// [accessoryLabel sizeToFit]; +// cell.accessoryView = accessoryLabel; +// cell.accessibilityIdentifier +// = ACCESSIBILITY_IDENTIFIER_WITH_NAME(AppSettingsViewController, @"network_status"); +// return cell; +// } +// actionBlock:nil]]; + // ======== } [section addItem:[OWSTableItem disclosureItemWithText:NSLocalizedString(@"SETTINGS_INVITE_TITLE",