bring back dcText

This commit is contained in:
levochkaa 2025-05-12 00:25:18 +04:00
parent 37c605a981
commit 3cbb7f3a25

View File

@ -2142,7 +2142,7 @@ private func infoItems(nearestChatParticipant: (String?, Int32?), showProfileId:
var phoneCountryText = "" var phoneCountryText = ""
var dcLabel = "" var dcLabel = ""
// var dcText: String = "" var dcText: String = ""
if let cachedData = data.cachedData as? CachedUserData, let phoneCountry = cachedData.peerStatusSettings?.phoneCountry { if let cachedData = data.cachedData as? CachedUserData, let phoneCountry = cachedData.peerStatusSettings?.phoneCountry {
var countryName = "" var countryName = ""
@ -2176,21 +2176,21 @@ private func infoItems(nearestChatParticipant: (String?, Int32?), showProfileId:
} }
if let dcId = dcId { if let dcId = dcId {
dcLabel = "\(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)"
// } }
} else if !phoneCountryText.isEmpty { } else if !phoneCountryText.isEmpty {
dcLabel = "?" dcLabel = "dc: ?"
// dcText = phoneCountryText dcText = phoneCountryText
} }
if !dcLabel.isEmpty { if !dcLabel.isEmpty {
items[.swiftgram]!.append(PeerInfoScreenLabeledValueItem(id: sgItemId, context: context, label: "dc", text: dcLabel, textColor: .primary, leftIcon: nil, icon: nil, action: { node, _ in items[.swiftgram]!.append(PeerInfoScreenLabeledValueItem(id: sgItemId, context: context, label: dcLabel, text: dcText, textColor: .primary, leftIcon: nil, icon: nil, action: { node, _ in
openDcContextMenu(node, nil) openDcContextMenu(node, nil)
}, longTapAction: nil, iconAction: nil, contextAction: { node, gesture, _ in }, longTapAction: nil, iconAction: nil, contextAction: { node, gesture, _ in
openDcContextMenu(node, gesture) openDcContextMenu(node, gesture)