mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Show Contact name, not number, of unregistered user
// FREEBIE
This commit is contained in:
parent
a210caed3d
commit
35a6dc7636
|
@ -250,10 +250,11 @@ NSString *const OWSContactsManagerSignalAccountsDidChangeNotification =
|
||||||
return self.unknownContactName;
|
return self.unknownContactName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: There's some overlap here with displayNameForSignalAccount.
|
// When viewing an old thread with someone who is no longer a Signal user, they won't have a SignalAccount
|
||||||
SignalAccount *signalAccount = [self signalAccountForRecipientId:identifier];
|
// so we get the name from `allContactsMap` as opposed to `signalAccountForRecipientId`.
|
||||||
|
Contact *contact = self.allContactsMap[identifier];
|
||||||
|
|
||||||
NSString *displayName = (signalAccount.contact.fullName.length > 0) ? signalAccount.contact.fullName : identifier;
|
NSString *displayName = (contact.fullName.length > 0) ? contact.fullName : identifier;
|
||||||
|
|
||||||
return displayName;
|
return displayName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue