mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-30 07:46:22 +00:00
keep refactoring
This commit is contained in:
parent
0b95ccd9df
commit
82a0c63d2e
1 changed files with 2 additions and 6 deletions
|
|
@ -265,13 +265,9 @@
|
||||||
|
|
||||||
if (![sip isEqualToString:@" "]) {
|
if (![sip isEqualToString:@" "]) {
|
||||||
if (_person) {
|
if (_person) {
|
||||||
normSip = sip;
|
normSip = [sip containsString:@"@"] ? [sip componentsSeparatedByString:@"@"][0] : sip;
|
||||||
CNInstantMessageAddress *cNSipMsgAddr;
|
CNInstantMessageAddress *cNSipMsgAddr;
|
||||||
if ([normSip containsString:@"@"])
|
cNSipMsgAddr = [[CNInstantMessageAddress alloc] initWithUsername:normSip service:@"SIP"]; //service:[normSip componentsSeparatedByString:@"@"][1]];
|
||||||
cNSipMsgAddr = [[CNInstantMessageAddress alloc] initWithUsername:[normSip componentsSeparatedByString:@"@"][0] service:@"SIP"]; //service:[normSip componentsSeparatedByString:@"@"][1]];
|
|
||||||
else
|
|
||||||
cNSipMsgAddr = [[CNInstantMessageAddress alloc] initWithUsername:normSip service:@"SIP"];
|
|
||||||
|
|
||||||
CNLabeledValue *sipAddress = [CNLabeledValue labeledValueWithLabel:NULL value:cNSipMsgAddr];
|
CNLabeledValue *sipAddress = [CNLabeledValue labeledValueWithLabel:NULL value:cNSipMsgAddr];
|
||||||
NSMutableArray<CNLabeledValue<CNInstantMessageAddress *> *> *tmpSipAddresses = [_person.instantMessageAddresses mutableCopy];
|
NSMutableArray<CNLabeledValue<CNInstantMessageAddress *> *> *tmpSipAddresses = [_person.instantMessageAddresses mutableCopy];
|
||||||
[tmpSipAddresses addObject:sipAddress];
|
[tmpSipAddresses addObject:sipAddress];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue