Settings discovery: Display human readable phone numbers.

This commit is contained in:
SBiOSoftWhare
2019-09-12 14:56:54 +02:00
parent 77342b4380
commit e37bc0d1f5
3 changed files with 19 additions and 5 deletions
@@ -114,7 +114,19 @@ private enum DiscoverySectionRows {
case .threePid(let threePid):
if let detailCell: MXKTableViewCell = self.cellType(at: row) {
detailCell.accessoryType = .disclosureIndicator
detailCell.textLabel?.text = threePid.address
let formattedThreePid: String?
switch threePid.medium {
case .email:
formattedThreePid = threePid.address
case .msisdn:
formattedThreePid = MXKTools.readableMSISDN(threePid.address)
default:
formattedThreePid = nil
}
detailCell.textLabel?.text = formattedThreePid
detailCell.isUserInteractionEnabled = enableInteraction
cell = detailCell
}