Do not show dcLocation

This commit is contained in:
Kylmakalle 2025-03-08 02:16:08 +02:00
parent 0824f5c12f
commit 722f779661

View File

@ -2082,7 +2082,7 @@ private func infoItems(nearestChatParticipant: (String?, Int32?), showProfileId:
if SGSimpleSettings.shared.showDC { if SGSimpleSettings.shared.showDC {
var dcId: Int? = nil var dcId: Int? = nil
var dcLocation: String = "" // var dcLocation: String = ""
var phoneCountryText = "" var phoneCountryText = ""
var dcLabel = "" var dcLabel = ""
@ -2103,28 +2103,28 @@ private func infoItems(nearestChatParticipant: (String?, Int32?), showProfileId:
if let peer = data.peer, let smallProfileImage = peer.smallProfileImage, let cloudResource = smallProfileImage.resource as? CloudPeerPhotoSizeMediaResource { if let peer = data.peer, let smallProfileImage = peer.smallProfileImage, let cloudResource = smallProfileImage.resource as? CloudPeerPhotoSizeMediaResource {
dcId = cloudResource.datacenterId dcId = cloudResource.datacenterId
switch (dcId) { // switch (dcId) {
case 1: // case 1:
dcLocation = "Miami" // dcLocation = "Miami"
case 2: // case 2:
dcLocation = "Amsterdam" // dcLocation = "Amsterdam"
case 3: // case 3:
dcLocation = "Miami" // dcLocation = "Miami"
case 4: // case 4:
dcLocation = "Amsterdam" // dcLocation = "Amsterdam"
case 5: // case 5:
dcLocation = "Singapore" // dcLocation = "Singapore"
default: // default:
break // break
} // }
} }
if let dcId = dcId { if let dcId = dcId {
dcLabel = "dc: \(dcId)" dcLabel = "dc: \(dcId)"
if phoneCountryText.isEmpty { if phoneCountryText.isEmpty {
if !dcLocation.isEmpty { // if !dcLocation.isEmpty {
dcLabel += " \(dcLocation)" // dcLabel += " \(dcLocation)"
} // }
} else { } else {
dcText = "\(phoneCountryText)" dcText = "\(phoneCountryText)"
} }