@ -82,36 +82,39 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
__weak PrivacySettingsTableViewController * weakSelf = self ;
__weak PrivacySettingsTableViewController * weakSelf = self ;
OWSTableSection * blocklistSection = [ OWSTableSection new ] ;
/ / Loki : Original code
blocklistSection . headerTitle
/ / == == == ==
= NSLocalizedString ( @ "SETTINGS_BLOCK_LIST_TITLE ", @ "Label for the block list section of the settings view ") ;
/ / OWSTableSection * blocklistSection = [ OWSTableSection new ] ;
[ blocklistSection
/ / blocklistSection . headerTitle
addItem : [ OWSTableItem disclosureItemWithText : NSLocalizedString ( @ "SETTINGS_BLOCK_LIST_TITLE ",
/ / = NSLocalizedString ( @ "SETTINGS_BLOCK_LIST_TITLE ", @ "Label for the block list section of the settings view ") ;
@ "Label for the block list section of the settings view ")
/ / [ blocklistSection
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"blocklist"]
/ / addItem : [ OWSTableItem disclosureItemWithText : NSLocalizedString ( @ "SETTINGS_BLOCK_LIST_TITLE ",
actionBlock : ^{
/ / @ "Label for the block list section of the settings view ")
[ weakSelf showBlocklist ] ;
/ / accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"blocklist"]
} ] ] ;
/ / actionBlock : ^{
[ contents addSection : blocklistSection ] ;
/ / [ weakSelf showBlocklist ] ;
/ / } ] ] ;
OWSTableSection * readReceiptsSection = [ OWSTableSection new ] ;
/ / [ contents addSection : blocklistSection ] ;
readReceiptsSection . headerTitle
/ /
= NSLocalizedString ( @ "SETTINGS_READ_RECEIPT ", @ "Label for the ' read receipts' setting . ") ;
/ / OWSTableSection * readReceiptsSection = [ OWSTableSection new ] ;
readReceiptsSection . footerTitle = NSLocalizedString (
/ / readReceiptsSection . headerTitle
@ "SETTINGS_READ_RECEIPTS_SECTION_FOOTER ", @ "An explanation of the ' read receipts' setting . ") ;
/ / = NSLocalizedString ( @ "SETTINGS_READ_RECEIPT ", @ "Label for the ' read receipts' setting . ") ;
[ readReceiptsSection
/ / readReceiptsSection . footerTitle = NSLocalizedString (
addItem : [ OWSTableItem switchItemWithText : NSLocalizedString ( @ "SETTINGS_READ_RECEIPT ",
/ / @ "SETTINGS_READ_RECEIPTS_SECTION_FOOTER ", @ "An explanation of the ' read receipts' setting . ") ;
@ "Label for the ' read receipts' setting . ")
/ / [ readReceiptsSection
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"read_receipts"]
/ / addItem : [ OWSTableItem switchItemWithText : NSLocalizedString ( @ "SETTINGS_READ_RECEIPT ",
isOnBlock : ^{
/ / @ "Label for the ' read receipts' setting . ")
return [ OWSReadReceiptManager . sharedManager areReadReceiptsEnabled ] ;
/ / accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"read_receipts"]
}
/ / isOnBlock : ^{
isEnabledBlock : ^{
/ / return [ OWSReadReceiptManager . sharedManager areReadReceiptsEnabled ] ;
return YES ;
/ / }
}
/ / isEnabledBlock : ^{
target : weakSelf
/ / return YES ;
selector : @ selector ( didToggleReadReceiptsSwitch : ) ] ] ;
/ / }
[ contents addSection : readReceiptsSection ] ;
/ / target : weakSelf
/ / selector : @ selector ( didToggleReadReceiptsSwitch : ) ] ] ;
/ / [ contents addSection : readReceiptsSection ] ;
/ / == == == ==
OWSTableSection * typingIndicatorsSection = [ OWSTableSection new ] ;
OWSTableSection * typingIndicatorsSection = [ OWSTableSection new ] ;
typingIndicatorsSection . headerTitle
typingIndicatorsSection . headerTitle
@ -135,8 +138,7 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
OWSTableSection * screenLockSection = [ OWSTableSection new ] ;
OWSTableSection * screenLockSection = [ OWSTableSection new ] ;
screenLockSection . headerTitle = NSLocalizedString (
screenLockSection . headerTitle = NSLocalizedString (
@ "SETTINGS_SCREEN_LOCK_SECTION_TITLE ", @ "Title for the ' screen lock' section of the privacy settings . ") ;
@ "SETTINGS_SCREEN_LOCK_SECTION_TITLE ", @ "Title for the ' screen lock' section of the privacy settings . ") ;
screenLockSection . footerTitle = NSLocalizedString (
screenLockSection . footerTitle = NSLocalizedString ( @ "Unlock Loki Messenger ' s screen using Touch ID , Face ID , or your iOS device passcode . You can still answer incoming calls and receive message notifications while Screen Lock is enabled . Loki Messenger ' s notification settings allow you to customize the information that is displayed . ", @ "") ;
@ "SETTINGS_SCREEN_LOCK_SECTION_FOOTER ", @ "Footer for the ' screen lock' section of the privacy settings . ") ;
[ screenLockSection
[ screenLockSection
addItem : [ OWSTableItem
addItem : [ OWSTableItem
switchItemWithText : NSLocalizedString ( @ "SETTINGS_SCREEN_LOCK_SWITCH_LABEL ",
switchItemWithText : NSLocalizedString ( @ "SETTINGS_SCREEN_LOCK_SWITCH_LABEL ",
@ -172,7 +174,7 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
OWSTableSection * screenSecuritySection = [ OWSTableSection new ] ;
OWSTableSection * screenSecuritySection = [ OWSTableSection new ] ;
screenSecuritySection . headerTitle = NSLocalizedString ( @ "SETTINGS_SECURITY_TITLE ", @ "Section header ") ;
screenSecuritySection . headerTitle = NSLocalizedString ( @ "SETTINGS_SECURITY_TITLE ", @ "Section header ") ;
screenSecuritySection . footerTitle = NSLocalizedString ( @ "SETTINGS_SCREEN_SECURITY_DETAIL ", nil ) ;
screenSecuritySection . footerTitle = NSLocalizedString ( @ "Prevent Loki Messenger previews from appearing in the app switcher . ", nil ) ;
[ screenSecuritySection
[ screenSecuritySection
addItem : [ OWSTableItem switchItemWithText : NSLocalizedString ( @ "SETTINGS_SCREEN_SECURITY ", @ "")
addItem : [ OWSTableItem switchItemWithText : NSLocalizedString ( @ "SETTINGS_SCREEN_SECURITY ", @ "")
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"screen_security"]
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"screen_security"]
@ -186,100 +188,103 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
selector : @ selector ( didToggleScreenSecuritySwitch : ) ] ] ;
selector : @ selector ( didToggleScreenSecuritySwitch : ) ] ] ;
[ contents addSection : screenSecuritySection ] ;
[ contents addSection : screenSecuritySection ] ;
/ / Allow calls to connect directly vs . using TURN exclusively
/ / Loki : Original code
OWSTableSection * callingSection = [ OWSTableSection new ] ;
/ / == == == ==
callingSection . headerTitle
/ / / / Allow calls to connect directly vs . using TURN exclusively
= NSLocalizedString ( @ "SETTINGS_SECTION_TITLE_CALLING ", @ "settings topic header for table section ") ;
/ / OWSTableSection * callingSection = [ OWSTableSection new ] ;
callingSection . footerTitle = NSLocalizedString ( @ "SETTINGS_CALLING_HIDES_IP_ADDRESS_PREFERENCE_TITLE_DETAIL ",
/ / callingSection . headerTitle
@ "User settings section footer , a detailed explanation ") ;
/ / = NSLocalizedString ( @ "SETTINGS_SECTION_TITLE_CALLING ", @ "settings topic header for table section ") ;
[ callingSection addItem : [ OWSTableItem switchItemWithText : NSLocalizedString (
/ / callingSection . footerTitle = NSLocalizedString ( @ "SETTINGS_CALLING_HIDES_IP_ADDRESS_PREFERENCE_TITLE_DETAIL ",
@ "SETTINGS_CALLING_HIDES_IP_ADDRESS_PREFERENCE_TITLE ",
/ / @ "User settings section footer , a detailed explanation ") ;
@ "Table cell label ")
/ / [ callingSection addItem : [ OWSTableItem switchItemWithText : NSLocalizedString (
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@",
/ / @ "SETTINGS_CALLING_HIDES_IP_ADDRESS_PREFERENCE_TITLE ",
@ "calling_hide_ip_address "]
/ / @ "Table cell label ")
isOnBlock : ^{
/ / accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@",
return [ Environment . shared . preferences doCallsHideIPAddress ] ;
/ / @ "calling_hide_ip_address "]
}
/ / isOnBlock : ^{
isEnabledBlock : ^{
/ / return [ Environment . shared . preferences doCallsHideIPAddress ] ;
return YES ;
/ / }
}
/ / isEnabledBlock : ^{
target : weakSelf
/ / return YES ;
selector : @ selector ( didToggleCallsHideIPAddressSwitch : ) ] ] ;
/ / }
[ contents addSection : callingSection ] ;
/ / target : weakSelf
/ / selector : @ selector ( didToggleCallsHideIPAddressSwitch : ) ] ] ;
if ( CallUIAdapter . isCallkitDisabledForLocale ) {
/ / [ contents addSection : callingSection ] ;
/ / Hide all CallKit - related prefs ; CallKit is disabled .
/ /
} else if ( @ available ( iOS 11 , * ) ) {
/ / if ( CallUIAdapter . isCallkitDisabledForLocale ) {
OWSTableSection * callKitSection = [ OWSTableSection new ] ;
/ / / / Hide all CallKit - related prefs ; CallKit is disabled .
[ callKitSection
/ / } else if ( @ available ( iOS 11 , * ) ) {
addItem : [ OWSTableItem switchItemWithText : NSLocalizedString (
/ / OWSTableSection * callKitSection = [ OWSTableSection new ] ;
@ "SETTINGS_PRIVACY_CALLKIT_SYSTEM_CALL_LOG_PREFERENCE_TITLE ",
/ / [ callKitSection
@ "Short table cell label ")
/ / addItem : [ OWSTableItem switchItemWithText : NSLocalizedString (
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"callkit_history"]
/ / @ "SETTINGS_PRIVACY_CALLKIT_SYSTEM_CALL_LOG_PREFERENCE_TITLE ",
isOnBlock : ^{
/ / @ "Short table cell label ")
return [ Environment . shared . preferences isSystemCallLogEnabled ] ;
/ / accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"callkit_history"]
}
/ / isOnBlock : ^{
isEnabledBlock : ^{
/ / return [ Environment . shared . preferences isSystemCallLogEnabled ] ;
return YES ;
/ / }
}
/ / isEnabledBlock : ^{
target : weakSelf
/ / return YES ;
selector : @ selector ( didToggleEnableSystemCallLogSwitch : ) ] ] ;
/ / }
callKitSection . footerTitle = NSLocalizedString (
/ / target : weakSelf
@ "SETTINGS_PRIVACY_CALLKIT_SYSTEM_CALL_LOG_PREFERENCE_DESCRIPTION ", @ "Settings table section footer . ") ;
/ / selector : @ selector ( didToggleEnableSystemCallLogSwitch : ) ] ] ;
[ contents addSection : callKitSection ] ;
/ / callKitSection . footerTitle = NSLocalizedString (
} else if ( @ available ( iOS 10 , * ) ) {
/ / @ "SETTINGS_PRIVACY_CALLKIT_SYSTEM_CALL_LOG_PREFERENCE_DESCRIPTION ", @ "Settings table section footer . ") ;
OWSTableSection * callKitSection = [ OWSTableSection new ] ;
/ / [ contents addSection : callKitSection ] ;
callKitSection . footerTitle
/ / } else if ( @ available ( iOS 10 , * ) ) {
= NSLocalizedString ( @ "SETTINGS_SECTION_CALL_KIT_DESCRIPTION ", @ "Settings table section footer . ") ;
/ / OWSTableSection * callKitSection = [ OWSTableSection new ] ;
[ callKitSection
/ / callKitSection . footerTitle
addItem : [ OWSTableItem switchItemWithText : NSLocalizedString (
/ / = NSLocalizedString ( @ "SETTINGS_SECTION_CALL_KIT_DESCRIPTION ", @ "Settings table section footer . ") ;
@ "SETTINGS_PRIVACY_CALLKIT_TITLE ", @ "Short table cell label ")
/ / [ callKitSection
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"callkit"]
/ / addItem : [ OWSTableItem switchItemWithText : NSLocalizedString (
isOnBlock : ^{
/ / @ "SETTINGS_PRIVACY_CALLKIT_TITLE ", @ "Short table cell label ")
return [ Environment . shared . preferences isCallKitEnabled ] ;
/ / accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"callkit"]
}
/ / isOnBlock : ^{
isEnabledBlock : ^{
/ / return [ Environment . shared . preferences isCallKitEnabled ] ;
return YES ;
/ / }
}
/ / isEnabledBlock : ^{
target : weakSelf
/ / return YES ;
selector : @ selector ( didToggleEnableCallKitSwitch : ) ] ] ;
/ / }
if ( self . preferences . isCallKitEnabled ) {
/ / target : weakSelf
[ callKitSection
/ / selector : @ selector ( didToggleEnableCallKitSwitch : ) ] ] ;
addItem : [ OWSTableItem switchItemWithText : NSLocalizedString ( @ "SETTINGS_PRIVACY_CALLKIT_PRIVACY_TITLE ",
/ / if ( self . preferences . isCallKitEnabled ) {
@ "Label for ' CallKit privacy' preference ")
/ / [ callKitSection
accessibilityIdentifier : [ NSString
/ / addItem : [ OWSTableItem switchItemWithText : NSLocalizedString ( @ "SETTINGS_PRIVACY_CALLKIT_PRIVACY_TITLE ",
stringWithFormat : @ "settings . privacy . %@", @"callkit_privacy"]
/ / @ "Label for ' CallKit privacy' preference ")
isOnBlock : ^{
/ / accessibilityIdentifier : [ NSString
return ( BOOL ) ![ Environment . shared . preferences isCallKitPrivacyEnabled ] ;
/ / stringWithFormat : @ "settings . privacy . %@", @"callkit_privacy"]
}
/ / isOnBlock : ^{
isEnabledBlock : ^{
/ / return ( BOOL ) ![ Environment . shared . preferences isCallKitPrivacyEnabled ] ;
return YES ;
/ / }
}
/ / isEnabledBlock : ^{
target : weakSelf
/ / return YES ;
selector : @ selector ( didToggleEnableCallKitPrivacySwitch : ) ] ] ;
/ / }
}
/ / target : weakSelf
[ contents addSection : callKitSection ] ;
/ / selector : @ selector ( didToggleEnableCallKitPrivacySwitch : ) ] ] ;
}
/ / }
/ / [ contents addSection : callKitSection ] ;
OWSTableSection * twoFactorAuthSection = [ OWSTableSection new ] ;
/ / }
twoFactorAuthSection . headerTitle = NSLocalizedString (
/ /
@ "SETTINGS_TWO_FACTOR_AUTH_TITLE ", @ "Title for the ' two factor auth' section of the privacy settings . ") ;
/ / OWSTableSection * twoFactorAuthSection = [ OWSTableSection new ] ;
[ twoFactorAuthSection
/ / twoFactorAuthSection . headerTitle = NSLocalizedString (
addItem :
/ / @ "SETTINGS_TWO_FACTOR_AUTH_TITLE ", @ "Title for the ' two factor auth' section of the privacy settings . ") ;
[ OWSTableItem
/ / [ twoFactorAuthSection
disclosureItemWithText : NSLocalizedString ( @ "SETTINGS_TWO_FACTOR_AUTH_ITEM ",
/ / addItem :
@ "Label for the ' two factor auth' item of the privacy settings . ")
/ / [ OWSTableItem
detailText :
/ / disclosureItemWithText : NSLocalizedString ( @ "SETTINGS_TWO_FACTOR_AUTH_ITEM ",
( [ OWS2FAManager . sharedManager is2FAEnabled ]
/ / @ "Label for the ' two factor auth' item of the privacy settings . ")
? NSLocalizedString ( @ "SETTINGS_TWO_FACTOR_AUTH_ENABLED ",
/ / detailText :
@ "Indicates that ' two factor auth' is enabled in the privacy settings . ")
/ / ( [ OWS2FAManager . sharedManager is2FAEnabled ]
: NSLocalizedString ( @ "SETTINGS_TWO_FACTOR_AUTH_DISABLED ",
/ / ? NSLocalizedString ( @ "SETTINGS_TWO_FACTOR_AUTH_ENABLED ",
@ "Indicates that ' two factor auth' is disabled in the privacy settings . ") )
/ / @ "Indicates that ' two factor auth' is enabled in the privacy settings . ")
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"2fa"]
/ / : NSLocalizedString ( @ "SETTINGS_TWO_FACTOR_AUTH_DISABLED ",
actionBlock : ^{
/ / @ "Indicates that ' two factor auth' is disabled in the privacy settings . ") )
[ weakSelf show2FASettings ] ;
/ / accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"2fa"]
} ] ] ;
/ / actionBlock : ^{
[ contents addSection : twoFactorAuthSection ] ;
/ / [ weakSelf show2FASettings ] ;
/ / } ] ] ;
/ / [ contents addSection : twoFactorAuthSection ] ;
/ / == == == ==
OWSTableSection * historyLogsSection = [ OWSTableSection new ] ;
OWSTableSection * historyLogsSection = [ OWSTableSection new ] ;
historyLogsSection . headerTitle = NSLocalizedString ( @ "SETTINGS_HISTORYLOG_TITLE ", @ "Section header ") ;
historyLogsSection . headerTitle = NSLocalizedString ( @ "SETTINGS_HISTORYLOG_TITLE ", @ "Section header ") ;
@ -291,95 +296,98 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
} ] ] ;
} ] ] ;
[ contents addSection : historyLogsSection ] ;
[ contents addSection : historyLogsSection ] ;
OWSTableSection * unidentifiedDeliveryIndicatorsSection = [ OWSTableSection new ] ;
/ / Loki : Original code
unidentifiedDeliveryIndicatorsSection . headerTitle
/ / == == == ==
= NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_SECTION_TITLE ", @ "table section label ") ;
/ / OWSTableSection * unidentifiedDeliveryIndicatorsSection = [ OWSTableSection new ] ;
[ unidentifiedDeliveryIndicatorsSection
/ / unidentifiedDeliveryIndicatorsSection . headerTitle
addItem : [ OWSTableItem
/ / = NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_SECTION_TITLE ", @ "table section label ") ;
itemWithCustomCellBlock : ^UITableViewCell * {
/ / [ unidentifiedDeliveryIndicatorsSection
UITableViewCell * cell = [ [ UITableViewCell alloc ] initWithStyle : UITableViewCellStyleValue1
/ / addItem : [ OWSTableItem
reuseIdentifier : @ "UITableViewCellStyleValue1 "] ;
/ / itemWithCustomCellBlock : ^UITableViewCell * {
[ OWSTableItem configureCell : cell ] ;
/ / UITableViewCell * cell = [ [ UITableViewCell alloc ] initWithStyle : UITableViewCellStyleValue1
cell . preservesSuperviewLayoutMargins = YES ;
/ / reuseIdentifier : @ "UITableViewCellStyleValue1 "] ;
cell . contentView . preservesSuperviewLayoutMargins = YES ;
/ / [ OWSTableItem configureCell : cell ] ;
cell . selectionStyle = UITableViewCellSelectionStyleNone ;
/ / cell . preservesSuperviewLayoutMargins = YES ;
/ / cell . contentView . preservesSuperviewLayoutMargins = YES ;
UILabel * label = [ UILabel new ] ;
/ / cell . selectionStyle = UITableViewCellSelectionStyleNone ;
label . text
/ /
= NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_SHOW_INDICATORS ", @ "switch label ") ;
/ / UILabel * label = [ UILabel new ] ;
label . font = [ UIFont ows_regularFontWithSize : 18. f ] ;
/ / label . text
label . textColor = [ Theme primaryColor ] ;
/ / = NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_SHOW_INDICATORS ", @ "switch label ") ;
[ label setContentHuggingHorizontalHigh ] ;
/ / label . font = [ UIFont ows_regularFontWithSize : 18. f ] ;
/ / label . textColor = [ Theme primaryColor ] ;
UIImage * icon = [ UIImage imageNamed : @ "ic_secret_sender_indicator "] ;
/ / [ label setContentHuggingHorizontalHigh ] ;
UIImageView * iconView = [ [ UIImageView alloc ]
/ /
initWithImage : [ icon imageWithRenderingMode : UIImageRenderingModeAlwaysTemplate ] ] ;
/ / UIImage * icon = [ UIImage imageNamed : @ "ic_secret_sender_indicator "] ;
iconView . tintColor = Theme . secondaryColor ;
/ / UIImageView * iconView = [ [ UIImageView alloc ]
[ iconView setContentHuggingHorizontalHigh ] ;
/ / initWithImage : [ icon imageWithRenderingMode : UIImageRenderingModeAlwaysTemplate ] ] ;
/ / iconView . tintColor = Theme . secondaryColor ;
UIView * spacer = [ UIView new ] ;
/ / [ iconView setContentHuggingHorizontalHigh ] ;
[ spacer setContentHuggingHorizontalLow ] ;
/ /
/ / UIView * spacer = [ UIView new ] ;
UISwitch * cellSwitch = [ UISwitch new ] ;
/ / [ spacer setContentHuggingHorizontalLow ] ;
cell . accessoryView = cellSwitch ;
/ /
[ cellSwitch setOn : Environment . shared . preferences . shouldShowUnidentifiedDeliveryIndicators ] ;
/ / UISwitch * cellSwitch = [ UISwitch new ] ;
[ cellSwitch addTarget : weakSelf
/ / cell . accessoryView = cellSwitch ;
action : @ selector ( didToggleUDShowIndicatorsSwitch : )
/ / [ cellSwitch setOn : Environment . shared . preferences . shouldShowUnidentifiedDeliveryIndicators ] ;
forControlEvents : UIControlEventValueChanged ] ;
/ / [ cellSwitch addTarget : weakSelf
[ cellSwitch setContentHuggingHorizontalHigh ] ;
/ / action : @ selector ( didToggleUDShowIndicatorsSwitch : )
cellSwitch . accessibilityIdentifier =
/ / forControlEvents : UIControlEventValueChanged ] ;
[ NSString stringWithFormat : @ "settings . privacy . %@", @"sealed_sender"];
/ / [ cellSwitch setContentHuggingHorizontalHigh ] ;
/ / cellSwitch . accessibilityIdentifier =
UIStackView * stackView =
/ / [ NSString stringWithFormat : @ "settings . privacy . %@", @"sealed_sender"];
[ [ UIStackView alloc ] initWithArrangedSubviews : @ [ label , iconView , spacer , cellSwitch ] ] ;
/ /
stackView . axis = UILayoutConstraintAxisHorizontal ;
/ / UIStackView * stackView =
stackView . spacing = 10 ;
/ / [ [ UIStackView alloc ] initWithArrangedSubviews : @ [ label , iconView , spacer , cellSwitch ] ] ;
stackView . alignment = UIStackViewAlignmentCenter ;
/ / stackView . axis = UILayoutConstraintAxisHorizontal ;
/ / stackView . spacing = 10 ;
[ cell . contentView addSubview : stackView ] ;
/ / stackView . alignment = UIStackViewAlignmentCenter ;
[ stackView ows_autoPinToSuperviewMargins ] ;
/ /
return cell ;
/ / [ cell . contentView addSubview : stackView ] ;
}
/ / [ stackView ows_autoPinToSuperviewMargins ] ;
customRowHeight : UITableViewAutomaticDimension
/ / return cell ;
actionBlock : ^{
/ / }
NSURL * url = [ NSURL URLWithString : kSealedSenderInfoURL ] ;
/ / customRowHeight : UITableViewAutomaticDimension
OWSCAssertDebug ( url ) ;
/ / actionBlock : ^{
[ UIApplication . sharedApplication openURL : url ] ;
/ / NSURL * url = [ NSURL URLWithString : kSealedSenderInfoURL ] ;
} ] ] ;
/ / OWSCAssertDebug ( url ) ;
/ / [ UIApplication . sharedApplication openURL : url ] ;
unidentifiedDeliveryIndicatorsSection . footerTitle
/ / } ] ] ;
= NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_SHOW_INDICATORS_FOOTER ", @ "table section footer ") ;
/ /
[ contents addSection : unidentifiedDeliveryIndicatorsSection ] ;
/ / unidentifiedDeliveryIndicatorsSection . footerTitle
/ / = NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_SHOW_INDICATORS_FOOTER ", @ "table section footer ") ;
OWSTableSection * unidentifiedDeliveryUnrestrictedSection = [ OWSTableSection new ] ;
/ / [ contents addSection : unidentifiedDeliveryIndicatorsSection ] ;
OWSTableItem * unrestrictedAccessItem = [ OWSTableItem
/ /
switchItemWithText : NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_UNRESTRICTED_ACCESS ", @ "switch label ")
/ / OWSTableSection * unidentifiedDeliveryUnrestrictedSection = [ OWSTableSection new ] ;
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"sealed_sender_unrestricted"]
/ / OWSTableItem * unrestrictedAccessItem = [ OWSTableItem
isOnBlock : ^{
/ / switchItemWithText : NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_UNRESTRICTED_ACCESS ", @ "switch label ")
return [ SSKEnvironment . shared . udManager shouldAllowUnrestrictedAccessLocal ] ;
/ / accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@", @"sealed_sender_unrestricted"]
}
/ / isOnBlock : ^{
isEnabledBlock : ^{
/ / return [ SSKEnvironment . shared . udManager shouldAllowUnrestrictedAccessLocal ] ;
return YES ;
/ / }
}
/ / isEnabledBlock : ^{
target : weakSelf
/ / return YES ;
selector : @ selector ( didToggleUDUnrestrictedAccessSwitch : ) ] ;
/ / }
[ unidentifiedDeliveryUnrestrictedSection addItem : unrestrictedAccessItem ] ;
/ / target : weakSelf
unidentifiedDeliveryUnrestrictedSection . footerTitle
/ / selector : @ selector ( didToggleUDUnrestrictedAccessSwitch : ) ] ;
= NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_UNRESTRICTED_ACCESS_FOOTER ", @ "table section footer ") ;
/ / [ unidentifiedDeliveryUnrestrictedSection addItem : unrestrictedAccessItem ] ;
[ contents addSection : unidentifiedDeliveryUnrestrictedSection ] ;
/ / unidentifiedDeliveryUnrestrictedSection . footerTitle
/ / = NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_UNRESTRICTED_ACCESS_FOOTER ", @ "table section footer ") ;
OWSTableSection * unidentifiedDeliveryLearnMoreSection = [ OWSTableSection new ] ;
/ / [ contents addSection : unidentifiedDeliveryUnrestrictedSection ] ;
[ unidentifiedDeliveryLearnMoreSection
/ /
addItem : [ OWSTableItem disclosureItemWithText : NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_LEARN_MORE ",
/ / OWSTableSection * unidentifiedDeliveryLearnMoreSection = [ OWSTableSection new ] ;
@ "Label for a link to more info about unidentified delivery . ")
/ / [ unidentifiedDeliveryLearnMoreSection
accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@",
/ / addItem : [ OWSTableItem disclosureItemWithText : NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_LEARN_MORE ",
@ "sealed_sender_learn_more "]
/ / @ "Label for a link to more info about unidentified delivery . ")
actionBlock : ^{
/ / accessibilityIdentifier : [ NSString stringWithFormat : @ "settings . privacy . %@",
NSURL * url = [ NSURL URLWithString : kSealedSenderInfoURL ] ;
/ / @ "sealed_sender_learn_more "]
OWSCAssertDebug ( url ) ;
/ / actionBlock : ^{
[ UIApplication . sharedApplication openURL : url ] ;
/ / NSURL * url = [ NSURL URLWithString : kSealedSenderInfoURL ] ;
} ] ] ;
/ / OWSCAssertDebug ( url ) ;
[ contents addSection : unidentifiedDeliveryLearnMoreSection ] ;
/ / [ UIApplication . sharedApplication openURL : url ] ;
/ / } ] ] ;
/ / [ contents addSection : unidentifiedDeliveryLearnMoreSection ] ;
/ / == == == ==
OWSTableSection * linkPreviewsSection = [ OWSTableSection new ] ;
OWSTableSection * linkPreviewsSection = [ OWSTableSection new ] ;
[ linkPreviewsSection
[ linkPreviewsSection