mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
Show matrix identifier in second line
This commit is contained in:
@@ -199,6 +199,7 @@
|
||||
|
||||
[self refreshContactPresence];
|
||||
[self refreshContactBadgeImage];
|
||||
[self refreshLocalContactInformation];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -323,22 +324,31 @@
|
||||
{
|
||||
// Display the first contact method in sub label.
|
||||
NSString *subLabelText = nil;
|
||||
if (contact.emailAddresses.count)
|
||||
{
|
||||
MXKEmail* email = contact.emailAddresses.firstObject;
|
||||
subLabelText = email.emailAddress;
|
||||
}
|
||||
else if (contact.phoneNumbers.count)
|
||||
{
|
||||
MXKPhoneNumber *phoneNumber = contact.phoneNumbers.firstObject;
|
||||
|
||||
if (phoneNumber.nbPhoneNumber)
|
||||
if(![BWIBuildSettings.shared showContactIdentifierInDetailRow]) {
|
||||
if (contact.emailAddresses.count)
|
||||
{
|
||||
subLabelText = [[NBPhoneNumberUtil sharedInstance] format:phoneNumber.nbPhoneNumber numberFormat:NBEPhoneNumberFormatINTERNATIONAL error:nil];
|
||||
MXKEmail* email = contact.emailAddresses.firstObject;
|
||||
subLabelText = email.emailAddress;
|
||||
}
|
||||
else
|
||||
else if (contact.phoneNumbers.count)
|
||||
{
|
||||
subLabelText = phoneNumber.textNumber;
|
||||
MXKPhoneNumber *phoneNumber = contact.phoneNumbers.firstObject;
|
||||
|
||||
if (phoneNumber.nbPhoneNumber)
|
||||
{
|
||||
subLabelText = [[NBPhoneNumberUtil sharedInstance] format:phoneNumber.nbPhoneNumber numberFormat:NBEPhoneNumberFormatINTERNATIONAL error:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
subLabelText = phoneNumber.textNumber;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
NSArray *identifiers = contact.matrixIdentifiers;
|
||||
if (identifiers.count)
|
||||
{
|
||||
NSString *userId = identifiers.firstObject;
|
||||
subLabelText = userId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user