|
|
@ -218,12 +218,10 @@ typedef NS_ENUM(NSInteger, AdvancedSettingsTableViewControllerSection) {
|
|
|
|
[[TSNetworkManager sharedManager] makeRequest:request
|
|
|
|
[[TSNetworkManager sharedManager] makeRequest:request
|
|
|
|
success:^(NSURLSessionDataTask *task, id responseObject) {
|
|
|
|
success:^(NSURLSessionDataTask *task, id responseObject) {
|
|
|
|
|
|
|
|
|
|
|
|
AdvancedSettingsTableViewController *strongSelf = weakSelf;
|
|
|
|
|
|
|
|
// Use the request id to ignore obsolete requests, e.g. if the
|
|
|
|
// Use the request id to ignore obsolete requests, e.g. if the
|
|
|
|
// user repeatedly changes the setting faster than the requests
|
|
|
|
// user repeatedly changes the setting faster than the requests
|
|
|
|
// can complete.
|
|
|
|
// can complete.
|
|
|
|
if (!strongSelf ||
|
|
|
|
if (enableWebRTCRequestCounter != enableWebRTCRequestId) {
|
|
|
|
enableWebRTCRequestCounter != enableWebRTCRequestId) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -231,7 +229,8 @@ typedef NS_ENUM(NSInteger, AdvancedSettingsTableViewControllerSection) {
|
|
|
|
// otherwise local and service state will fall out of sync
|
|
|
|
// otherwise local and service state will fall out of sync
|
|
|
|
// with every network failure.
|
|
|
|
// with every network failure.
|
|
|
|
[Environment.preferences setIsWebRTCEnabled:isWebRTCEnabled];
|
|
|
|
[Environment.preferences setIsWebRTCEnabled:isWebRTCEnabled];
|
|
|
|
[strongSelf.tableView reloadData];
|
|
|
|
|
|
|
|
|
|
|
|
[weakSelf.tableView reloadData];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
failure:^(NSURLSessionDataTask *task, NSError *error) {
|
|
|
|
failure:^(NSURLSessionDataTask *task, NSError *error) {
|
|
|
|
DDLogError(@"Updating attributes failed with error: %@", error.description);
|
|
|
|
DDLogError(@"Updating attributes failed with error: %@", error.description);
|
|
|
|