mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Swiftgram Pro label
This commit is contained in:
parent
e031002f40
commit
bc1796f172
@ -978,10 +978,20 @@ private func settingsItems(showProfileId: Bool, data: PeerInfoScreenData?, conte
|
|||||||
swiftgramLabel = .none
|
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
|
let sgWebSettings = context.currentAppConfiguration.with({ $0 }).sgWebSettings
|
||||||
if sgWebSettings.global.paymentsEnabled || context.sharedContext.immediateSGStatus.status > 1 {
|
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)
|
interaction.openSettings(.swiftgramPro)
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user