Swiftgram Pro label

This commit is contained in:
Kylmakalle 2025-05-09 11:46:30 +03:00
parent e031002f40
commit bc1796f172

View File

@ -977,11 +977,21 @@ private func settingsItems(showProfileId: Bool, data: PeerInfoScreenData?, conte
} else {
swiftgramLabel = .none
}
let hasNewSGProFeatures = {
return false
}
let swiftgramProLabel: PeerInfoScreenDisclosureItem.Label
if hasNewSGProFeatures() {
swiftgramProLabel = .titleBadge(presentationData.strings.Settings_New, presentationData.theme.list.itemAccentColor)
} else {
swiftgramProLabel = .none
}
let sgWebSettings = context.currentAppConfiguration.with({ $0 }).sgWebSettings
if sgWebSettings.global.paymentsEnabled || context.sharedContext.immediateSGStatus.status > 1 {
items[.swiftgram]!.append(PeerInfoScreenDisclosureItem(id: 0, label: .titleBadge(presentationData.strings.Settings_New, presentationData.theme.list.itemAccentColor), text: "Swiftgram Pro", icon: PresentationResourcesSettings.swiftgramPro, action: {
items[.swiftgram]!.append(PeerInfoScreenDisclosureItem(id: 0, label: swiftgramProLabel, text: "Swiftgram Pro", icon: PresentationResourcesSettings.swiftgramPro, action: {
interaction.openSettings(.swiftgramPro)
}))
}