copy mtapienvironment

This commit is contained in:
overtake
2017-07-29 02:19:16 +03:00
parent 734406407c
commit 5b3825cde2

View File

@@ -373,6 +373,22 @@ typedef enum {
return result;
}
-(id)copy {
MTApiEnvironment *result = [[MTApiEnvironment alloc] init];
result.apiId = self.apiId;
result.appVersion = self.appVersion;
result.layer = self.layer;
result.langPack = self.langPack;
result->_langPackCode = self.langPackCode;
result.disableUpdates = self.disableUpdates;
result.tcpPayloadPrefix = self.tcpPayloadPrefix;
result.datacenterAddressOverrides = self.datacenterAddressOverrides;
result->_socksProxySettings = self.socksProxySettings;
[result _updateApiInitializationHash];
return result;
}
- (MTApiEnvironment *)withUpdatedSocksProxySettings:(MTSocksProxySettings *)socksProxySettings {
MTApiEnvironment *result = [[MTApiEnvironment alloc] init];