mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Hide OverlayStatusController implementation
This commit is contained in:
parent
2744880667
commit
d1e57a24bb
@ -4,7 +4,12 @@ import AsyncDisplayKit
|
||||
import TelegramPresentationData
|
||||
import RadialStatusNode
|
||||
|
||||
public final class LegacyDataImportSplash: WindowCoveringView {
|
||||
public protocol LegacyDataImportSplash: WindowCoveringView {
|
||||
var progress: (AccountImportProgressType, Float) { get set }
|
||||
var serviceAction: (() -> Void)? { get set }
|
||||
}
|
||||
|
||||
private final class LegacyDataImportSplashImpl: WindowCoveringView, LegacyDataImportSplash {
|
||||
private let theme: PresentationTheme?
|
||||
private let strings: PresentationStrings?
|
||||
|
||||
@ -78,3 +83,7 @@ public final class LegacyDataImportSplash: WindowCoveringView {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func makeLegacyDataImportSplash(theme: PresentationTheme?, strings: PresentationStrings?) -> LegacyDataImportSplash {
|
||||
return LegacyDataImportSplashImpl(theme: theme, strings: strings)
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public enum OverlayStatusControllerStyle {
|
||||
case dark
|
||||
}
|
||||
|
||||
public final class OverlayStatusController: ViewController, StandalonePresentableController {
|
||||
private final class OverlayStatusControllerImpl: ViewController, StandalonePresentableController {
|
||||
private let style: OverlayStatusControllerStyle
|
||||
private let type: OverlayStatusControllerType
|
||||
|
||||
@ -152,7 +152,7 @@ public final class OverlayStatusController: ViewController, StandalonePresentabl
|
||||
self.statusBar.statusBarStyle = .Ignore
|
||||
}
|
||||
|
||||
required init(coder aDecoder: NSCoder) {
|
||||
required public init(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
@ -183,3 +183,7 @@ public final class OverlayStatusController: ViewController, StandalonePresentabl
|
||||
self.controllerNode.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
public func OverlayStatusController(style: OverlayStatusControllerStyle, type: OverlayStatusControllerType) -> ViewController {
|
||||
return OverlayStatusControllerImpl(style: style, type: type)
|
||||
}
|
||||
|
@ -2,9 +2,8 @@ import Foundation
|
||||
import UIKit
|
||||
import OverlayStatusController
|
||||
import TelegramPresentationData
|
||||
import Display
|
||||
|
||||
public extension OverlayStatusController {
|
||||
convenience init(theme: PresentationTheme, type: OverlayStatusControllerType) {
|
||||
self.init(style: theme.actionSheet.backgroundType == .light ? .light : .dark, type: type)
|
||||
}
|
||||
public func OverlayStatusController(theme: PresentationTheme, type: OverlayStatusControllerType) -> ViewController {
|
||||
return OverlayStatusController(style: theme.actionSheet.backgroundType == .light ? .light : .dark, type: type)
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import TelegramPresentationData
|
||||
import ActivityIndicator
|
||||
import OverlayStatusController
|
||||
import AccountContext
|
||||
import PresentationDataUtils
|
||||
|
||||
public final class ProxyServerActionSheetController: ActionSheetController {
|
||||
private var presentationDisposable: Disposable?
|
||||
|
@ -6,6 +6,7 @@ import TelegramCore
|
||||
import SyncCore
|
||||
import OverlayStatusController
|
||||
import AccountContext
|
||||
import PresentationDataUtils
|
||||
|
||||
private let maximumNumberOfAccounts = 3
|
||||
|
||||
|
@ -14,6 +14,7 @@ import AccountContext
|
||||
import ShareController
|
||||
import SearchUI
|
||||
import HexColor
|
||||
import PresentationDataUtils
|
||||
|
||||
final class ThemeGridController: ViewController {
|
||||
private var controllerNode: ThemeGridControllerNode {
|
||||
|
@ -32,6 +32,7 @@ import WalletUrl
|
||||
import WalletCore
|
||||
import OpenSSLEncryptionProvider
|
||||
import AppLock
|
||||
import PresentationDataUtils
|
||||
|
||||
#if canImport(BackgroundTasks)
|
||||
import BackgroundTasks
|
||||
@ -627,7 +628,7 @@ final class SharedApplicationContext {
|
||||
return (upgradedAccounts(accountManager: accountManager, rootPath: rootPath, encryptionParameters: encryptionParameters)
|
||||
|> deliverOnMainQueue).start(next: { progress in
|
||||
if self.dataImportSplash == nil {
|
||||
self.dataImportSplash = LegacyDataImportSplash(theme: nil, strings: nil)
|
||||
self.dataImportSplash = makeLegacyDataImportSplash(theme: nil, strings: nil)
|
||||
self.dataImportSplash?.serviceAction = {
|
||||
self.debugPressed()
|
||||
}
|
||||
@ -739,7 +740,7 @@ final class SharedApplicationContext {
|
||||
}, displayUpgradeProgress: { progress in
|
||||
if let progress = progress {
|
||||
if self.dataImportSplash == nil {
|
||||
self.dataImportSplash = LegacyDataImportSplash(theme: initialPresentationDataAndSettings.presentationData.theme, strings: initialPresentationDataAndSettings.presentationData.strings)
|
||||
self.dataImportSplash = makeLegacyDataImportSplash(theme: initialPresentationDataAndSettings.presentationData.theme, strings: initialPresentationDataAndSettings.presentationData.strings)
|
||||
self.dataImportSplash?.serviceAction = {
|
||||
self.debugPressed()
|
||||
}
|
||||
@ -881,7 +882,7 @@ final class SharedApplicationContext {
|
||||
case let .progress(type, value):
|
||||
Queue.mainQueue().async {
|
||||
if self.dataImportSplash == nil {
|
||||
self.dataImportSplash = LegacyDataImportSplash(theme: nil, strings: nil)
|
||||
self.dataImportSplash = makeLegacyDataImportSplash(theme: nil, strings: nil)
|
||||
self.dataImportSplash?.serviceAction = {
|
||||
self.debugPressed()
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ import ContextUI
|
||||
import LegacyUI
|
||||
import AppBundle
|
||||
import SaveToCameraRoll
|
||||
import PresentationDataUtils
|
||||
|
||||
private struct MessageContextMenuData {
|
||||
let starStatus: Bool?
|
||||
|
@ -11,6 +11,7 @@ import MergeLists
|
||||
import OverlayStatusController
|
||||
import AccountContext
|
||||
import StickerPackPreviewUI
|
||||
import PresentationDataUtils
|
||||
|
||||
final class TrendingPaneInteraction {
|
||||
let installPack: (ItemCollectionInfo) -> Void
|
||||
|
@ -209,7 +209,7 @@ func openResolvedUrlImpl(_ resolvedUrl: ResolvedUrl, context: AccountContext, ur
|
||||
}
|
||||
case let .wallpaper(parameter):
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
var controller: OverlayStatusController?
|
||||
var controller: ViewController?
|
||||
|
||||
let signal: Signal<TelegramWallpaper, GetWallpaperError>
|
||||
var options: WallpaperPresentationOptions?
|
||||
|
@ -317,8 +317,6 @@ func walletStringsFormattedNumber(_ count: Int32, _ groupingSeparator: String =
|
||||
}
|
||||
}
|
||||
|
||||
extension OverlayStatusController {
|
||||
convenience init(theme: WalletTheme, type: OverlayStatusControllerType) {
|
||||
self.init(style: theme.keyboardAppearance == .dark ? .dark : .light, type: type)
|
||||
}
|
||||
func OverlayStatusController(theme: WalletTheme, type: OverlayStatusControllerType) -> ViewController {
|
||||
return OverlayStatusController(style: theme.keyboardAppearance == .dark ? .dark : .light, type: type)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user