Don't display contact controls in My Profile

This commit is contained in:
Isaac 2024-04-11 16:21:23 +04:00
parent 109d3f4bc4
commit dba4c79106

View File

@ -1363,6 +1363,8 @@ private func infoItems(data: PeerInfoScreenData?, context: AccountContext, prese
}
}
}
if !isMyProfile {
if let reactionSourceMessageId = reactionSourceMessageId, !data.isContact {
items[.peerInfo]!.append(PeerInfoScreenActionItem(id: 3, text: presentationData.strings.UserInfo_SendMessage, action: {
interaction.openChat(nil)
@ -1426,7 +1428,7 @@ private func infoItems(data: PeerInfoScreenData?, context: AccountContext, prese
}))
items[.peerInfo]!.append(PeerInfoScreenCommentItem(id: 8, text: presentationData.strings.Bot_AddToChatInfo))
}
}
}
} else if let channel = data.peer as? TelegramChannel {
let ItemUsername = 1