@ -12,6 +12,7 @@
#import < SignalMessaging / ThreadUtil . h >
#import < SignalServiceKit / OWS2FAManager . h >
#import < SignalServiceKit / OWSReadReceiptManager . h >
#import < SignalServiceKit / SignalServiceKit - Swift . h >
NS_ASSUME_NONNULL_BEGIN
@ -48,6 +49,13 @@ NS_ASSUME_NONNULL_BEGIN
[ [ NSNotificationCenter defaultCenter ] removeObserver : self ] ;
}
#pragma mark - Dependencies
- ( id < OWSUDManager > ) udManager
{
return SSKEnvironment . shared . udManager ;
}
#pragma mark - Table Contents
- ( void ) updateTableContents
@ -193,6 +201,22 @@ NS_ASSUME_NONNULL_BEGIN
} ] ] ;
[ contents addSection : historyLogsSection ] ;
OWSTableSection * unidentifiedDeliverySection = [ OWSTableSection new ] ;
unidentifiedDeliverySection . headerTitle
= NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_SECTION_TITLE ", @ "table section label ") ;
unidentifiedDeliverySection . footerTitle
= NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_SECTION_FOOTER ", @ "table section footer ") ;
OWSTableItem * unrestrictedAccessItem = [ OWSTableItem
switchItemWithText : NSLocalizedString ( @ "SETTINGS_UNIDENTIFIED_DELIVERY_UNRESTRICTED_ACCESS ", @ "switch label ")
isOn : weakSelf . udManager . shouldAllowUnrestrictedAccessLocal
target : weakSelf
selector : @ selector ( didToggleUDUnrestrictedAccessSwitch : ) ] ;
[ unidentifiedDeliverySection addItem : unrestrictedAccessItem ] ;
[ contents addSection : unidentifiedDeliverySection ] ;
self . contents = contents ;
}
@ -282,6 +306,12 @@ NS_ASSUME_NONNULL_BEGIN
[ SignalApp . sharedApp . callService createCallUIAdapter ] ;
}
- ( void ) didToggleUDUnrestrictedAccessSwitch : ( UISwitch * ) sender
{
OWSLogInfo ( @ "toggled to : %@", (sender.isOn ? @"ON" : @"OFF"));
[ self . udManager setShouldAllowUnrestrictedAccessLocal : sender . isOn ] ;
}
- ( void ) show2FASettings
{
OWSLogInfo ( @ "") ;