mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various improvements
This commit is contained in:
@@ -25,6 +25,7 @@ import LocationUI
|
||||
import AppLock
|
||||
import WallpaperBackgroundNode
|
||||
import InAppPurchaseManager
|
||||
import PremiumUI
|
||||
|
||||
private final class AccountUserInterfaceInUseContext {
|
||||
let subscribers = Bag<(Bool) -> Void>()
|
||||
@@ -1459,6 +1460,43 @@ public final class SharedAccountContextImpl: SharedAccountContext {
|
||||
public func makePrivacyAndSecurityController(context: AccountContext) -> ViewController {
|
||||
return SettingsUI.makePrivacyAndSecurityController(context: context)
|
||||
}
|
||||
|
||||
public func makePremiumIntroController(context: AccountContext, source: PremiumIntroSource) -> ViewController {
|
||||
let mappedSource: PremiumSource
|
||||
switch source {
|
||||
case .settings:
|
||||
mappedSource = .settings
|
||||
case .stickers:
|
||||
mappedSource = .stickers
|
||||
case .reactions:
|
||||
mappedSource = .reactions
|
||||
case .ads:
|
||||
mappedSource = .ads
|
||||
case .upload:
|
||||
mappedSource = .upload
|
||||
case .groupsAndChannels:
|
||||
mappedSource = .groupsAndChannels
|
||||
case .pinnedChats:
|
||||
mappedSource = .pinnedChats
|
||||
case .publicLinks:
|
||||
mappedSource = .publicLinks
|
||||
case .savedGifs:
|
||||
mappedSource = .savedGifs
|
||||
case .savedStickers:
|
||||
mappedSource = .savedStickers
|
||||
case .folders:
|
||||
mappedSource = .folders
|
||||
case .chatsPerFolder:
|
||||
mappedSource = .chatsPerFolder
|
||||
case .accounts:
|
||||
mappedSource = .accounts
|
||||
case let .deeplink(reference):
|
||||
mappedSource = .deeplink(reference)
|
||||
case let .profile(peerId):
|
||||
mappedSource = .profile(peerId)
|
||||
}
|
||||
return PremiumIntroScreen(context: context, source: mappedSource)
|
||||
}
|
||||
}
|
||||
|
||||
private func peerInfoControllerImpl(context: AccountContext, updatedPresentationData: (PresentationData, Signal<PresentationData, NoError>)?, peer: Peer, mode: PeerInfoControllerMode, avatarInitiallyExpanded: Bool, isOpenedFromChat: Bool, requestsContext: PeerInvitationImportersContext? = nil) -> ViewController? {
|
||||
|
||||
Reference in New Issue
Block a user