diff --git a/Telegram/BUILD b/Telegram/BUILD
index 80e67b357a..9ebc14f4cd 100644
--- a/Telegram/BUILD
+++ b/Telegram/BUILD
@@ -138,7 +138,7 @@ genrule(
],
)
-minimum_os_version = "12.0"
+minimum_os_version = "13.0"
notificationServiceExtensionVersion = "v1"
@@ -1630,7 +1630,7 @@ plist_fragment(
UIInterfaceOrientationLandscapeRight
UIViewControllerBasedStatusBarAppearance
-
+
UIViewEdgeAntialiasing
UIViewGroupOpacity
diff --git a/Telegram/SiriIntents/IntentHandler.swift b/Telegram/SiriIntents/IntentHandler.swift
index fc3edc3ce2..46395e888b 100644
--- a/Telegram/SiriIntents/IntentHandler.swift
+++ b/Telegram/SiriIntents/IntentHandler.swift
@@ -70,9 +70,8 @@ class IntentHandler: INExtension {
}
}
-@available(iOSApplicationExtension 10.0, iOS 10.0, *)
@objc(IntentHandler)
-class DefaultIntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessagesIntentHandling, INSetMessageAttributeIntentHandling, INStartAudioCallIntentHandling, INSearchCallHistoryIntentHandling {
+class DefaultIntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessagesIntentHandling, INSetMessageAttributeIntentHandling, INStartCallIntentHandling, INSearchCallHistoryIntentHandling {
private let accountPromise = Promise()
private let allAccounts = Promise<[(AccountRecordId, PeerId, Bool)]>()
@@ -234,16 +233,31 @@ class DefaultIntentHandler: INExtension, INSendMessageIntentHandling, INSearchFo
var personResolutionResult: INPersonResolutionResult {
switch self {
- case let .success(person):
- return .success(with: person)
- case let .disambiguation(persons):
- return .disambiguation(with: persons)
- case .needsValue:
- return .needsValue()
- case .noResult:
- return .unsupported()
- case .skip:
- return .notRequired()
+ case let .success(person):
+ return .success(with: person)
+ case let .disambiguation(persons):
+ return .disambiguation(with: persons)
+ case .needsValue:
+ return .needsValue()
+ case .noResult:
+ return .unsupported()
+ case .skip:
+ return .notRequired()
+ }
+ }
+
+ var contactResolutionResult: INStartCallContactResolutionResult {
+ switch self {
+ case let .success(person):
+ return .success(with: person)
+ case let .disambiguation(persons):
+ return .disambiguation(with: persons)
+ case .needsValue:
+ return .needsValue()
+ case .noResult:
+ return .unsupported()
+ case .skip:
+ return .notRequired()
}
}
}
@@ -644,36 +658,34 @@ class DefaultIntentHandler: INExtension, INSendMessageIntentHandling, INSearchFo
}
// MARK: - INStartAudioCallIntentHandling
-
- public func resolveContacts(for intent: INStartAudioCallIntent, with completion: @escaping ([INPersonResolutionResult]) -> Void) {
+ public func resolveContacts(for intent: INStartCallIntent, with completion: @escaping ([INStartCallContactResolutionResult]) -> Void) {
if let appGroupUrl = self.appGroupUrl {
let rootPath = rootPathForBasePath(appGroupUrl.path)
if let data = try? Data(contentsOf: URL(fileURLWithPath: appLockStatePath(rootPath: rootPath))), let state = try? JSONDecoder().decode(LockState.self, from: data), isAppLocked(state: state) {
- completion([INPersonResolutionResult.notRequired()])
+ completion([INStartCallContactResolutionResult.notRequired()])
return
}
}
guard CNContactStore.authorizationStatus(for: .contacts) == .authorized else {
- completion([INPersonResolutionResult.notRequired()])
+ completion([INStartCallContactResolutionResult.notRequired()])
return
}
self.resolve(persons: intent.contacts, with: { result in
- completion(result.map { $0.personResolutionResult })
+ completion(result.map { $0.contactResolutionResult })
})
}
- @available(iOSApplicationExtension 11.0, iOS 11.0, *)
- public func resolveDestinationType(for intent: INStartAudioCallIntent, with completion: @escaping (INCallDestinationTypeResolutionResult) -> Void) {
+ public func resolveDestinationType(for intent: INStartCallIntent, with completion: @escaping (INCallDestinationTypeResolutionResult) -> Void) {
completion(.success(with: .normal))
}
- public func handle(intent: INStartAudioCallIntent, completion: @escaping (INStartAudioCallIntentResponse) -> Void) {
+ public func handle(intent: INStartCallIntent, completion: @escaping (INStartCallIntentResponse) -> Void) {
if let appGroupUrl = self.appGroupUrl {
let rootPath = rootPathForBasePath(appGroupUrl.path)
if let data = try? Data(contentsOf: URL(fileURLWithPath: appLockStatePath(rootPath: rootPath))), let state = try? JSONDecoder().decode(LockState.self, from: data), isAppLocked(state: state) {
- let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartAudioCallIntent.self))
- let response = INStartAudioCallIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity)
+ let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartCallIntent.self))
+ let response = INStartCallIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity)
completion(response)
return
}
@@ -699,13 +711,13 @@ class DefaultIntentHandler: INExtension, INSendMessageIntentHandling, INSearchFo
return .single(peerId)
}
|> deliverOnMainQueue).start(next: { peerId in
- let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartAudioCallIntent.self))
+ let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartCallIntent.self))
userActivity.userInfo = ["handle": "TGCA\(peerId.toInt64())"]
- let response = INStartAudioCallIntentResponse(code: .continueInApp, userActivity: userActivity)
+ let response = INStartCallIntentResponse(code: .continueInApp, userActivity: userActivity)
completion(response)
}, error: { _ in
- let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartAudioCallIntent.self))
- let response = INStartAudioCallIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity)
+ let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartCallIntent.self))
+ let response = INStartCallIntentResponse(code: .failureRequiringAppLaunch, userActivity: userActivity)
completion(response)
}))
}
diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings
index 19dc49b48b..c183840dc9 100644
--- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings
+++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings
@@ -14438,3 +14438,7 @@ Sorry for the inconvenience.";
"Stars.Transaction.GiftTransfer" = "Gift Transfer";
"Stars.Intro.Transaction.GiftTransfer" = "Gift Transfer";
+
+"SuggestPost.SetTimeFormat.Date" = "%@";
+"SuggestPost.SetTimeFormat.TodayAt" = "Today at %@";
+"SuggestPost.SetTimeFormat.TomorrowAt" = "Tomorrow at %@";
diff --git a/submodules/ActivityIndicator/Sources/ActivityIndicator.swift b/submodules/ActivityIndicator/Sources/ActivityIndicator.swift
index 8a91a27ab3..00a4397777 100644
--- a/submodules/ActivityIndicator/Sources/ActivityIndicator.swift
+++ b/submodules/ActivityIndicator/Sources/ActivityIndicator.swift
@@ -117,10 +117,10 @@ public final class ActivityIndicator: ASDisplayNode {
let indicatorView: UIActivityIndicatorView
switch self.type {
case let .navigationAccent(color):
- indicatorView = UIActivityIndicatorView(style: .whiteLarge)
+ indicatorView = UIActivityIndicatorView(style: UIActivityIndicatorView.Style.large)
indicatorView.color = color
case let .custom(color, diameter, _, forceCustom):
- indicatorView = UIActivityIndicatorView(style: diameter < 15.0 ? .white : .whiteLarge)
+ indicatorView = UIActivityIndicatorView(style: diameter < 15.0 ? UIActivityIndicatorView.Style.medium : UIActivityIndicatorView.Style.large)
indicatorView.color = convertIndicatorColor(color)
if !forceCustom {
self.view.addSubview(indicatorView)
diff --git a/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryControllerNode.swift b/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryControllerNode.swift
index e50e9d8d2a..7a0c7afc0c 100644
--- a/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryControllerNode.swift
+++ b/submodules/BotPaymentsUI/Sources/BotCheckoutNativeCardEntryControllerNode.swift
@@ -502,8 +502,8 @@ final class BotCheckoutNativeCardEntryControllerNode: ViewControllerTracingNode,
if self.scrollNode.view.contentInset != insets {
self.scrollNode.view.contentInset = insets
}
- if self.scrollNode.view.scrollIndicatorInsets != insets {
- self.scrollNode.view.scrollIndicatorInsets = insets
+ if self.scrollNode.view.verticalScrollIndicatorInsets != insets {
+ self.scrollNode.view.verticalScrollIndicatorInsets = insets
}
self.scrollNode.view.ignoreUpdateBounds = false
diff --git a/submodules/BrowserUI/Sources/BrowserDocumentContent.swift b/submodules/BrowserUI/Sources/BrowserDocumentContent.swift
index 5f37e9a89c..fedb0f2c10 100644
--- a/submodules/BrowserUI/Sources/BrowserDocumentContent.swift
+++ b/submodules/BrowserUI/Sources/BrowserDocumentContent.swift
@@ -279,7 +279,7 @@ final class BrowserDocumentContent: UIView, BrowserContent, WKNavigationDelegate
self.webView.reloadInputViews()
}
- self.webView.scrollView.scrollIndicatorInsets = UIEdgeInsets(top: 0.0, left: -insets.left, bottom: 0.0, right: -insets.right)
+ self.webView.scrollView.verticalScrollIndicatorInsets = UIEdgeInsets(top: 0.0, left: -insets.left, bottom: 0.0, right: -insets.right)
self.webView.scrollView.horizontalScrollIndicatorInsets = UIEdgeInsets(top: 0.0, left: -insets.left, bottom: 0.0, right: -insets.right)
}
diff --git a/submodules/BrowserUI/Sources/BrowserWebContent.swift b/submodules/BrowserUI/Sources/BrowserWebContent.swift
index 0f6923e00b..8fc6c4d6ce 100644
--- a/submodules/BrowserUI/Sources/BrowserWebContent.swift
+++ b/submodules/BrowserUI/Sources/BrowserWebContent.swift
@@ -648,7 +648,7 @@ final class BrowserWebContent: UIView, BrowserContent, WKNavigationDelegate, WKU
} else {
self.webView.customBottomInset = safeInsets.bottom * (1.0 - insets.bottom / fullInsets.bottom)
}
-// self.webView.scrollView.scrollIndicatorInsets = UIEdgeInsets(top: 0.0, left: -insets.left, bottom: 0.0, right: -insets.right)
+// self.webView.scrollView.verticalScrollIndicatorInsets = UIEdgeInsets(top: 0.0, left: -insets.left, bottom: 0.0, right: -insets.right)
// self.webView.scrollView.horizontalScrollIndicatorInsets = UIEdgeInsets(top: 0.0, left: -insets.left, bottom: 0.0, right: -insets.right)
if let error = self.currentError {
diff --git a/submodules/CalendarMessageScreen/Sources/CalendarMessageScreen.swift b/submodules/CalendarMessageScreen/Sources/CalendarMessageScreen.swift
index 991e2bea6d..cb97a18dfa 100644
--- a/submodules/CalendarMessageScreen/Sources/CalendarMessageScreen.swift
+++ b/submodules/CalendarMessageScreen/Sources/CalendarMessageScreen.swift
@@ -1609,7 +1609,7 @@ public final class CalendarMessageScreen: ViewController {
self.contextGestureContainerNode.frame = CGRect(origin: CGPoint(x: 0.0, y: navigationHeight), size: CGSize(width: layout.size.width, height: layout.size.height - navigationHeight))
self.scrollView.frame = CGRect(origin: CGPoint(x: 0.0, y: 0.0), size: CGSize(width: layout.size.width, height: layout.size.height - navigationHeight))
self.scrollView.contentSize = CGSize(width: layout.size.width, height: contentHeight)
- self.scrollView.scrollIndicatorInsets = UIEdgeInsets(top: max(layout.intrinsicInsets.bottom, self.scrollView.contentInset.top), left: 0.0, bottom: 0.0, right: layout.size.width - 3.0 - 6.0)
+ self.scrollView.verticalScrollIndicatorInsets = UIEdgeInsets(top: max(layout.intrinsicInsets.bottom, self.scrollView.contentInset.top), left: 0.0, bottom: 0.0, right: layout.size.width - 3.0 - 6.0)
return true
}
diff --git a/submodules/Components/ActivityIndicatorComponent/Sources/ActivityIndicatorComponent.swift b/submodules/Components/ActivityIndicatorComponent/Sources/ActivityIndicatorComponent.swift
index 263929fd42..aea2459d5a 100644
--- a/submodules/Components/ActivityIndicatorComponent/Sources/ActivityIndicatorComponent.swift
+++ b/submodules/Components/ActivityIndicatorComponent/Sources/ActivityIndicatorComponent.swift
@@ -20,7 +20,7 @@ public final class ActivityIndicatorComponent: Component {
public final class View: UIActivityIndicatorView {
public init() {
- super.init(style: .whiteLarge)
+ super.init(style: UIActivityIndicatorView.Style.large)
}
required public init(coder: NSCoder) {
diff --git a/submodules/ComposePollUI/Sources/ComposePollScreen.swift b/submodules/ComposePollUI/Sources/ComposePollScreen.swift
index 92636c4568..637a97fc28 100644
--- a/submodules/ComposePollUI/Sources/ComposePollScreen.swift
+++ b/submodules/ComposePollUI/Sources/ComposePollScreen.swift
@@ -1441,8 +1441,8 @@ final class ComposePollScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: environment.safeInsets.bottom, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
if let recenterOnTag {
diff --git a/submodules/ContextUI/Sources/ContextActionsContainerNode.swift b/submodules/ContextUI/Sources/ContextActionsContainerNode.swift
index e4f72eda92..d7e417101e 100644
--- a/submodules/ContextUI/Sources/ContextActionsContainerNode.swift
+++ b/submodules/ContextUI/Sources/ContextActionsContainerNode.swift
@@ -217,8 +217,6 @@ private final class InnerActionsContainerNode: ASDisplayNode {
} else {
effectView = UIVisualEffectView(effect: UIBlurEffect(style: .systemMaterialLight))
}
- } else if #available(iOS 10.0, *) {
- effectView = UIVisualEffectView(effect: UIBlurEffect(style: .regular))
} else {
effectView = UIVisualEffectView(effect: UIBlurEffect(style: .light))
}
@@ -572,8 +570,6 @@ final class InnerTextSelectionTipContainerNode: ASDisplayNode {
} else {
effectView = UIVisualEffectView(effect: UIBlurEffect(style: .systemMaterialLight))
}
- } else if #available(iOS 10.0, *) {
- effectView = UIVisualEffectView(effect: UIBlurEffect(style: .regular))
} else {
effectView = UIVisualEffectView(effect: UIBlurEffect(style: .light))
}
diff --git a/submodules/Display/Source/ChildWindowHostView.swift b/submodules/Display/Source/ChildWindowHostView.swift
index cda3f5178f..ec56b7723e 100644
--- a/submodules/Display/Source/ChildWindowHostView.swift
+++ b/submodules/Display/Source/ChildWindowHostView.swift
@@ -74,6 +74,7 @@ public func childWindowHostView(parent: UIView) -> WindowHostView {
}, updateSupportedInterfaceOrientations: { orientations in
}, updateDeferScreenEdgeGestures: { edges in
}, updatePrefersOnScreenNavigationHidden: { value in
+ }, updateStatusBar: { _, _, _ in
})
view.updateSize = { [weak hostView] size in
diff --git a/submodules/Display/Source/GridNode.swift b/submodules/Display/Source/GridNode.swift
index 622317ad8d..fe49aa8bac 100644
--- a/submodules/Display/Source/GridNode.swift
+++ b/submodules/Display/Source/GridNode.swift
@@ -906,9 +906,9 @@ open class GridNode: GridNodeScroller, ASScrollViewDelegate {
let layoutInsets = presentationLayoutTransition.layout.layout.insets
self.scrollView.contentInset = UIEdgeInsets(top: layoutInsets.top, left: 0.0, bottom: layoutInsets.bottom, right: 0.0)
if let scrollIndicatorInsets = presentationLayoutTransition.layout.layout.scrollIndicatorInsets {
- self.scrollView.scrollIndicatorInsets = scrollIndicatorInsets
+ self.scrollView.verticalScrollIndicatorInsets = scrollIndicatorInsets
} else {
- self.scrollView.scrollIndicatorInsets = presentationLayoutTransition.layout.layout.insets
+ self.scrollView.verticalScrollIndicatorInsets = presentationLayoutTransition.layout.layout.insets
}
var boundsOffset: CGFloat = 0.0
var shouldAnimateBounds = false
diff --git a/submodules/Display/Source/KeyShortcut.swift b/submodules/Display/Source/KeyShortcut.swift
index 8997ee43b1..1df6c1ceca 100644
--- a/submodules/Display/Source/KeyShortcut.swift
+++ b/submodules/Display/Source/KeyShortcut.swift
@@ -25,7 +25,8 @@ public struct KeyShortcut: Hashable {
extension KeyShortcut {
var uiKeyCommand: UIKeyCommand {
- let command = UIKeyCommand(input: self.input, modifierFlags: self.modifiers, action: #selector(KeyShortcutsController.handleKeyCommand(_:)), discoverabilityTitle: self.title)
+ let command = UIKeyCommand(input: self.input, modifierFlags: self.modifiers, action: #selector(KeyShortcutsController.handleKeyCommand(_:)))
+ command.discoverabilityTitle = self.title
if #available(iOS 15.0, *), ["\t", UIKeyCommand.inputUpArrow, UIKeyCommand.inputDownArrow, UIKeyCommand.inputLeftArrow, UIKeyCommand.inputRightArrow].contains(command.input) && self.modifiers.isEmpty {
command.wantsPriorityOverSystemBehavior = true
}
diff --git a/submodules/Display/Source/NativeWindowHostView.swift b/submodules/Display/Source/NativeWindowHostView.swift
index 4e1bd718ce..b20ac51f00 100644
--- a/submodules/Display/Source/NativeWindowHostView.swift
+++ b/submodules/Display/Source/NativeWindowHostView.swift
@@ -87,7 +87,7 @@ private final class WindowRootViewControllerView: UIView {
}
}
-private final class WindowRootViewController: UIViewController, UIViewControllerPreviewingDelegate {
+private final class WindowRootViewController: UIViewController {
private var voiceOverStatusObserver: AnyObject?
private var registeredForPreviewing = false
@@ -135,23 +135,44 @@ private final class WindowRootViewController: UIViewController, UIViewController
var prefersOnScreenNavigationHidden: Bool = false {
didSet {
if oldValue != self.prefersOnScreenNavigationHidden {
- if #available(iOSApplicationExtension 11.0, iOS 11.0, *) {
- self.setNeedsUpdateOfHomeIndicatorAutoHidden()
+ self.setNeedsUpdateOfHomeIndicatorAutoHidden()
+ }
+ }
+ }
+
+ private var statusBarStyle: UIStatusBarStyle = .default
+ private var isStatusBarHidden: Bool = false
+
+ func updateStatusBar(style: UIStatusBarStyle, isHidden: Bool, transition: ContainedViewLayoutTransition) {
+ if self.statusBarStyle != style || self.isStatusBarHidden != isHidden {
+ self.statusBarStyle = style
+ self.isStatusBarHidden = isHidden
+
+ switch transition {
+ case .immediate:
+ self.setNeedsStatusBarAppearanceUpdate()
+ case .animated:
+ transition.animateView {
+ self.setNeedsStatusBarAppearanceUpdate()
}
}
}
}
override var preferredStatusBarStyle: UIStatusBarStyle {
- return .default
+ return self.statusBarStyle
}
override var prefersStatusBarHidden: Bool {
- return false
+ return self.isStatusBarHidden
+ }
+
+ override var preferredStatusBarUpdateAnimation: UIStatusBarAnimation {
+ return .fade
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
- return orientations
+ return self.orientations
}
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
@@ -165,13 +186,8 @@ private final class WindowRootViewController: UIViewController, UIViewController
self.extendedLayoutIncludesOpaqueBars = true
- if #available(iOSApplicationExtension 11.0, iOS 11.0, *) {
- self.voiceOverStatusObserver = NotificationCenter.default.addObserver(forName: UIAccessibility.voiceOverStatusDidChangeNotification, object: nil, queue: OperationQueue.main, using: { [weak self] _ in
- if let strongSelf = self {
- strongSelf.updatePreviewingRegistration()
- }
- })
- }
+ self.voiceOverStatusObserver = NotificationCenter.default.addObserver(forName: UIAccessibility.voiceOverStatusDidChangeNotification, object: nil, queue: OperationQueue.main, using: { _ in
+ })
if #available(iOS 13.0, *) {
self._systemUserInterfaceStyle.set(WindowUserInterfaceStyle(style: self.traitCollection.userInterfaceStyle))
@@ -211,43 +227,6 @@ private final class WindowRootViewController: UIViewController, UIViewController
self.view = WindowRootViewControllerView()
self.view.isOpaque = false
self.view.backgroundColor = nil
-
- self.updatePreviewingRegistration()
- }
-
- private var previewingContext: AnyObject?
-
- private func updatePreviewingRegistration() {
- }
-
- private weak var previousPreviewingHostView: (UIView & PreviewingHostView)?
-
- public func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController? {
- if UIAccessibility.isVoiceOverRunning {
- return nil
- }
- if #available(iOSApplicationExtension 9.0, iOS 9.0, *) {
- guard let result = self.view.hitTest(location, with: nil) else {
- return nil
- }
- if let (result, resultPoint) = tracePreviewingHostView(view: result, point: self.view.convert(location, to: result)), let delegate = result.previewingDelegate {
- self.previousPreviewingHostView = result
- if let (controller, rect) = delegate.controllerForLocation(previewingContext.sourceView, resultPoint) {
- previewingContext.sourceRect = rect
- return controller
- }
- }
- }
- return nil
- }
-
- public func previewingContext(_ previewingContext: UIViewControllerPreviewing, commit viewControllerToCommit: UIViewController) {
- if #available(iOSApplicationExtension 9.0, iOS 9.0, *) {
- if let previousPreviewingHostView = self.previousPreviewingHostView, let delegate = previousPreviewingHostView.previewingDelegate {
- delegate.commitController(viewControllerToCommit)
- }
- self.previousPreviewingHostView = nil
- }
}
override public func present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil) {
@@ -410,6 +389,9 @@ public func nativeWindowHostView() -> (UIWindow & WindowHost, WindowHostView) {
},
updatePrefersOnScreenNavigationHidden: { value in
rootViewController.prefersOnScreenNavigationHidden = value
+ },
+ updateStatusBar: { statusBarStyle, isStatusBarHidden, transition in
+ rootViewController.updateStatusBar(style: statusBarStyle, isHidden: isStatusBarHidden, transition: transition)
}
)
diff --git a/submodules/Display/Source/Navigation/NavigationController.swift b/submodules/Display/Source/Navigation/NavigationController.swift
index e2bbb32347..7f7f88679f 100644
--- a/submodules/Display/Source/Navigation/NavigationController.swift
+++ b/submodules/Display/Source/Navigation/NavigationController.swift
@@ -276,6 +276,25 @@ open class NavigationController: UINavigationController, ContainableController,
var updateSupportedOrientations: (() -> Void)?
+ var statusBar: (style: UIStatusBarStyle, isHidden: Bool) {
+ let normalStatusBarStyle: UIStatusBarStyle
+ switch self.validStatusBarStyle {
+ case .none:
+ normalStatusBarStyle = .default
+ case .black:
+ if #available(iOS 13.0, *) {
+ normalStatusBarStyle = .darkContent
+ } else {
+ normalStatusBarStyle = .default
+ }
+ case .white:
+ normalStatusBarStyle = .lightContent
+ }
+
+ return (normalStatusBarStyle, self.validStatusBarHidden ?? false)
+ }
+ var updateStatusBar: ((ContainedViewLayoutTransition) -> Void)?
+
public func updateMasterDetailsBlackout(_ blackout: MasterDetailLayoutBlackout?, transition: ContainedViewLayoutTransition) {
self.masterDetailsBlackout = blackout
if isViewLoaded {
@@ -1247,25 +1266,15 @@ open class NavigationController: UINavigationController, ContainableController,
resolvedStatusBarStyle = .white
}
- if self.validStatusBarStyle != resolvedStatusBarStyle {
+ if self.validStatusBarStyle != resolvedStatusBarStyle || self.validStatusBarHidden != statusBarHidden {
self.validStatusBarStyle = resolvedStatusBarStyle
- let normalStatusBarStyle: UIStatusBarStyle
- switch resolvedStatusBarStyle {
- case .black:
- if #available(iOS 13.0, *) {
- normalStatusBarStyle = .darkContent
- } else {
- normalStatusBarStyle = .default
- }
- case .white:
- normalStatusBarStyle = .lightContent
- }
- self.statusBarHost?.setStatusBarStyle(normalStatusBarStyle, animated: animateStatusBarStyleTransition)
- }
-
- if self.validStatusBarHidden != statusBarHidden {
self.validStatusBarHidden = statusBarHidden
- self.statusBarHost?.setStatusBarHidden(statusBarHidden, animated: animateStatusBarStyleTransition)
+
+ var statusBarTransition = transition
+ if animateStatusBarStyleTransition && !statusBarTransition.isAnimated {
+ statusBarTransition = .animated(duration: 0.2, curve: .easeInOut)
+ }
+ self.updateStatusBar?(statusBarTransition)
}
var topHasOpaque = false
diff --git a/submodules/Display/Source/PresentationContext.swift b/submodules/Display/Source/PresentationContext.swift
index 57b6a5f091..575d0d0a39 100644
--- a/submodules/Display/Source/PresentationContext.swift
+++ b/submodules/Display/Source/PresentationContext.swift
@@ -46,6 +46,29 @@ public final class PresentationContext {
}
}
+ var statusBar: (style: UIStatusBarStyle, isHidden: Bool)? {
+ for (controller, _) in self.controllers.reversed() {
+ if let controller = controller as? ViewController {
+ if controller.statusBar.statusBarStyle != .Ignore {
+ var style: UIStatusBarStyle = .default
+ var isHidden: Bool = false
+ switch controller.statusBar.statusBarStyle {
+ case .White:
+ style = .lightContent
+ case .Black:
+ style = .darkContent
+ case .Ignore, .Hide:
+ style = .darkContent
+ isHidden = true
+ }
+ return (style, isHidden)
+ }
+ }
+ }
+ return nil
+ }
+ var updateStatusBar: ((ContainedViewLayoutTransition) -> Void)?
+
private var layout: ContainerViewLayout?
private var ready: Bool {
@@ -308,6 +331,8 @@ public final class PresentationContext {
controller.displayNode.accessibilityElementsHidden = false
}
}
+
+ self.updateStatusBar?(.animated(duration: 0.2, curve: .easeInOut))
}
private func notifyAccessibilityScreenChanged() {
diff --git a/submodules/Display/Source/StatusBarHost.swift b/submodules/Display/Source/StatusBarHost.swift
index 8c34f16999..e00dc926ee 100644
--- a/submodules/Display/Source/StatusBarHost.swift
+++ b/submodules/Display/Source/StatusBarHost.swift
@@ -3,15 +3,11 @@ import SwiftSignalKit
public protocol StatusBarHost {
var statusBarFrame: CGRect { get }
- var statusBarStyle: UIStatusBarStyle { get set }
var keyboardWindow: UIWindow? { get }
var keyboardView: UIView? { get }
var isApplicationInForeground: Bool { get }
- func setStatusBarStyle(_ style: UIStatusBarStyle, animated: Bool)
- func setStatusBarHidden(_ value: Bool, animated: Bool)
-
var shouldChangeStatusBarStyle: ((UIStatusBarStyle) -> Bool)? { get set }
}
diff --git a/submodules/Display/Source/UIKitUtils.swift b/submodules/Display/Source/UIKitUtils.swift
index c2727f91cf..717c380efe 100644
--- a/submodules/Display/Source/UIKitUtils.swift
+++ b/submodules/Display/Source/UIKitUtils.swift
@@ -80,20 +80,16 @@ public extension UIColor {
}
convenience init?(hexString: String) {
- let scanner = Scanner(string: hexString)
- if hexString.hasPrefix("#") {
- scanner.scanLocation = 1
- }
- var value: UInt32 = 0
- if scanner.scanHexInt32(&value) {
- if hexString.count > 7 {
- self.init(argb: value)
- } else {
- self.init(rgb: value)
- }
- } else {
+ let cleanedString = hexString.hasPrefix("#") ? hexString.dropFirst() : hexString[...]
+ guard let value = UInt32(cleanedString, radix: 16) else {
return nil
}
+
+ if hexString.count > 7 {
+ self.init(argb: value)
+ } else {
+ self.init(rgb: value)
+ }
}
var alpha: CGFloat {
diff --git a/submodules/Display/Source/WindowContent.swift b/submodules/Display/Source/WindowContent.swift
index b716d17fb4..62de4a8e04 100644
--- a/submodules/Display/Source/WindowContent.swift
+++ b/submodules/Display/Source/WindowContent.swift
@@ -161,6 +161,7 @@ public final class WindowHostView {
let updateSupportedInterfaceOrientations: (UIInterfaceOrientationMask) -> Void
let updateDeferScreenEdgeGestures: (UIRectEdge) -> Void
let updatePrefersOnScreenNavigationHidden: (Bool) -> Void
+ let updateStatusBar: (UIStatusBarStyle, Bool, ContainedViewLayoutTransition) -> Void
var present: ((ContainableController, PresentationSurfaceLevel, Bool, @escaping () -> Void) -> Void)?
var presentInGlobalOverlay: ((_ controller: ContainableController) -> Void)?
@@ -179,7 +180,7 @@ public final class WindowHostView {
var forEachController: (((ContainableController) -> Void) -> Void)?
var getAccessibilityElements: (() -> [Any]?)?
- init(containerView: UIView, eventView: UIView, isRotating: @escaping () -> Bool, systemUserInterfaceStyle: Signal, currentInterfaceOrientation: @escaping () -> UIInterfaceOrientation, updateSupportedInterfaceOrientations: @escaping (UIInterfaceOrientationMask) -> Void, updateDeferScreenEdgeGestures: @escaping (UIRectEdge) -> Void, updatePrefersOnScreenNavigationHidden: @escaping (Bool) -> Void) {
+ init(containerView: UIView, eventView: UIView, isRotating: @escaping () -> Bool, systemUserInterfaceStyle: Signal, currentInterfaceOrientation: @escaping () -> UIInterfaceOrientation, updateSupportedInterfaceOrientations: @escaping (UIInterfaceOrientationMask) -> Void, updateDeferScreenEdgeGestures: @escaping (UIRectEdge) -> Void, updatePrefersOnScreenNavigationHidden: @escaping (Bool) -> Void, updateStatusBar: @escaping (UIStatusBarStyle, Bool, ContainedViewLayoutTransition) -> Void) {
self.containerView = containerView
self.eventView = eventView
self.isRotating = isRotating
@@ -188,6 +189,7 @@ public final class WindowHostView {
self.updateSupportedInterfaceOrientations = updateSupportedInterfaceOrientations
self.updateDeferScreenEdgeGestures = updateDeferScreenEdgeGestures
self.updatePrefersOnScreenNavigationHidden = updatePrefersOnScreenNavigationHidden
+ self.updateStatusBar = updateStatusBar
}
fileprivate var onScreenNavigationHeight: CGFloat? {
@@ -385,6 +387,9 @@ public class Window1 {
self.presentationContext.updateIsInteractionBlocked = { [weak self] value in
self?.isInteractionBlocked = value
}
+ self.presentationContext.updateStatusBar = { [weak self] transition in
+ self?.updateStatusBar(transition: transition)
+ }
let updateOpaqueOverlays: () -> Void = { [weak self] in
guard let strongSelf = self else {
@@ -398,6 +403,9 @@ public class Window1 {
self.topPresentationContext.updateHasOpaqueOverlay = { value in
updateOpaqueOverlays()
}
+ self.topPresentationContext.updateStatusBar = { [weak self] transition in
+ self?.updateStatusBar(transition: transition)
+ }
self.hostView.present = { [weak self] controller, level, blockInteraction, completion in
self?.present(controller, on: level, blockInteraction: blockInteraction, completion: completion)
@@ -460,14 +468,16 @@ public class Window1 {
self.topPresentationContext.containerLayoutUpdated(containedLayoutForWindowLayout(self.windowLayout, deviceMetrics: self.deviceMetrics), transition: .immediate)
self.overlayPresentationContext.containerLayoutUpdated(containedLayoutForWindowLayout(self.windowLayout, deviceMetrics: self.deviceMetrics), transition: .immediate)
- self.statusBarChangeObserver = NotificationCenter.default.addObserver(forName: UIApplication.willChangeStatusBarFrameNotification, object: nil, queue: OperationQueue.main, using: { [weak self] notification in
+ //TODO:release check old iOS
+ /*self.statusBarChangeObserver = NotificationCenter.default.addObserver(forName: UIApplication.willChangeStatusBarFrameNotification, object: nil, queue: OperationQueue.main, using: { [weak self] notification in
if let strongSelf = self, strongSelf.statusBarHost != nil {
let statusBarHeight: CGFloat = max(defaultStatusBarHeight, (notification.userInfo?[UIApplication.statusBarFrameUserInfoKey] as? NSValue)?.cgRectValue.height ?? defaultStatusBarHeight)
let transition: ContainedViewLayoutTransition = .animated(duration: 0.35, curve: .easeInOut)
strongSelf.updateLayout { $0.update(statusBarHeight: statusBarHeight, transition: transition, overrideTransition: false) }
}
- })
+ })*/
+
self.keyboardRotationChangeObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name("UITextEffectsWindowDidRotateNotification"), object: nil, queue: nil, using: { [weak self] notification in
if let strongSelf = self {
if !strongSelf.hostView.isUpdatingOrientationLayout {
@@ -879,11 +889,18 @@ public class Window1 {
}
strongSelf.hostView.updateSupportedInterfaceOrientations(resolvedOrientations)
}
+ rootController.updateStatusBar = { [weak self] transition in
+ guard let self else {
+ return
+ }
+ self.updateStatusBar(transition: transition)
+ }
rootController.keyboardViewManager = self.keyboardViewManager
rootController.inCallNavigate = { [weak self] in
self?.inCallNavigate?()
}
}
+
self.hostView.containerView.insertSubview(rootController.view, at: 0)
if !self.windowLayout.size.width.isZero && !self.windowLayout.size.height.isZero {
rootController.displayNode.frame = CGRect(origin: CGPoint(), size: self.windowLayout.size)
@@ -968,6 +985,29 @@ public class Window1 {
}
}
+ private func updateStatusBar(transition: ContainedViewLayoutTransition) {
+ var style: UIStatusBarStyle = .default
+ var isHidden = false
+
+ if let rootController = self._rootController as? NavigationController {
+ let statusBar = rootController.statusBar
+ style = statusBar.style
+ isHidden = statusBar.isHidden
+ }
+
+ if let statusBar = self.presentationContext.statusBar {
+ style = statusBar.style
+ isHidden = statusBar.isHidden
+ }
+
+ if let statusBar = self.topPresentationContext.statusBar {
+ style = statusBar.style
+ isHidden = statusBar.isHidden
+ }
+
+ self.hostView.updateStatusBar(style, isHidden, transition)
+ }
+
private func layoutSubviews(force: Bool) {
if self.tracingStatusBarsInvalidated, let _ = keyboardManager {
self.tracingStatusBarsInvalidated = false
diff --git a/submodules/DrawingUI/Sources/DrawingTextEntityView.swift b/submodules/DrawingUI/Sources/DrawingTextEntityView.swift
index 98a3d0cbf7..ef85267ba2 100644
--- a/submodules/DrawingUI/Sources/DrawingTextEntityView.swift
+++ b/submodules/DrawingUI/Sources/DrawingTextEntityView.swift
@@ -1007,7 +1007,7 @@ final class DrawingTextLayoutManager: NSLayoutManager {
}
}
- override func showCGGlyphs(_ glyphs: UnsafePointer, positions: UnsafePointer, count glyphCount: Int, font: UIFont, matrix textMatrix: CGAffineTransform, attributes: [NSAttributedString.Key : Any] = [:], in graphicsContext: CGContext) {
+ override func showCGGlyphs(_ glyphs: UnsafePointer, positions: UnsafePointer, count glyphCount: Int, font: UIFont, textMatrix: CGAffineTransform, attributes: [NSAttributedString.Key : Any] = [:], in graphicsContext: CGContext) {
if let strokeColor = self.strokeColor {
graphicsContext.setStrokeColor(strokeColor.cgColor)
graphicsContext.setLineJoin(.round)
@@ -1019,7 +1019,7 @@ final class DrawingTextLayoutManager: NSLayoutManager {
graphicsContext.saveGState()
graphicsContext.translateBy(x: self.strokeOffset.x, y: self.strokeOffset.y)
- super.showCGGlyphs(glyphs, positions: positions, count: glyphCount, font: font, matrix: textMatrix, attributes: attributes, in: graphicsContext)
+ super.showCGGlyphs(glyphs, positions: positions, count: glyphCount, font: font, textMatrix: textMatrix, attributes: attributes, in: graphicsContext)
graphicsContext.restoreGState()
@@ -1028,7 +1028,7 @@ final class DrawingTextLayoutManager: NSLayoutManager {
graphicsContext.setFillColor(textColor.cgColor)
graphicsContext.setTextDrawingMode(.fill)
}
- super.showCGGlyphs(glyphs, positions: positions, count: glyphCount, font: font, matrix: textMatrix, attributes: attributes, in: graphicsContext)
+ super.showCGGlyphs(glyphs, positions: positions, count: glyphCount, font: font, textMatrix: textMatrix, attributes: attributes, in: graphicsContext)
}
override func drawBackground(forGlyphRange glyphsToShow: NSRange, at origin: CGPoint) {
diff --git a/submodules/LegacyComponents/Sources/TGViewController.mm b/submodules/LegacyComponents/Sources/TGViewController.mm
index 565c3585a9..6f286d4ca1 100644
--- a/submodules/LegacyComponents/Sources/TGViewController.mm
+++ b/submodules/LegacyComponents/Sources/TGViewController.mm
@@ -1204,7 +1204,7 @@ static id _defaultContext = nil;
UIEdgeInsets finalInset = self.controllerInset;
scrollView.contentInset = finalInset;
- scrollView.scrollIndicatorInsets = _explicitScrollIndicatorInset;
+ scrollView.verticalScrollIndicatorInsets = _explicitScrollIndicatorInset;
if (!UIEdgeInsetsEqualToEdgeInsets(previousInset, UIEdgeInsetsZero))
{
diff --git a/submodules/LegacyUI/Sources/LegacyController.swift b/submodules/LegacyUI/Sources/LegacyController.swift
index 0cfdafbf55..bc23833014 100644
--- a/submodules/LegacyUI/Sources/LegacyController.swift
+++ b/submodules/LegacyUI/Sources/LegacyController.swift
@@ -141,7 +141,7 @@ public final class LegacyControllerContext: NSObject, LegacyComponentsContext {
}
public func statusBarFrame() -> CGRect {
- return legacyComponentsApplication!.statusBarFrame
+ return legacyComponentsApplication!.delegate!.window!?.windowScene!.statusBarManager?.statusBarFrame ?? CGRect()
}
public func isStatusBarHidden() -> Bool {
diff --git a/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift b/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift
index 079d7e8842..2df91a8f2b 100644
--- a/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift
+++ b/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift
@@ -113,11 +113,11 @@ private final class LegacyComponentsGlobalsProviderImpl: NSObject, LegacyCompone
}
public func applicationStatusBarOrientation() -> UIInterfaceOrientation {
- return legacyComponentsApplication?.statusBarOrientation ?? UIInterfaceOrientation.portrait
+ return legacyComponentsApplication?.delegate?.window??.windowScene?.interfaceOrientation ?? .portrait
}
public func statusBarFrame() -> CGRect {
- return legacyComponentsApplication?.statusBarFrame ?? CGRect(origin: CGPoint(), size: CGSize(width: 320.0, height: 20.0))
+ return legacyComponentsApplication?.delegate?.window??.windowScene?.statusBarManager?.statusBarFrame ?? CGRect(origin: CGPoint(), size: CGSize(width: 320.0, height: 20.0))
}
public func isStatusBarHidden() -> Bool {
diff --git a/submodules/ListMessageItem/Sources/ListMessageHoleItem.swift b/submodules/ListMessageItem/Sources/ListMessageHoleItem.swift
index bb3e062657..d712fed09a 100644
--- a/submodules/ListMessageItem/Sources/ListMessageHoleItem.swift
+++ b/submodules/ListMessageItem/Sources/ListMessageHoleItem.swift
@@ -72,7 +72,7 @@ final class ListMessageHoleItemNode: ListViewItemNode {
override func didLoad() {
super.didLoad()
- let activityIndicator = UIActivityIndicatorView(style: .gray)
+ let activityIndicator = UIActivityIndicatorView(style: .medium)
self.activityIndicator = activityIndicator
self.view.addSubview(activityIndicator)
let size = activityIndicator.bounds.size
diff --git a/submodules/LocationResources/Sources/MapResources.swift b/submodules/LocationResources/Sources/MapResources.swift
index 08de2db8ef..a11f8f2842 100644
--- a/submodules/LocationResources/Sources/MapResources.swift
+++ b/submodules/LocationResources/Sources/MapResources.swift
@@ -63,7 +63,7 @@ private func fetchMapSnapshotResource(resource: MapSnapshotMediaResource) -> Sig
let latitude = adjustGMapLatitude(resource.latitude, offset: -10, zoom: 15)
options.region = MKCoordinateRegion(center: CLLocationCoordinate2DMake(latitude, resource.longitude), span: MKCoordinateSpan(latitudeDelta: 0.003, longitudeDelta: 0.003))
options.mapType = .standard
- options.showsPointsOfInterest = false
+ options.pointOfInterestFilter = .excludingAll
options.showsBuildings = true
options.size = CGSize(width: CGFloat(resource.width + 1), height: CGFloat(resource.height + 10))
options.scale = 2.0
diff --git a/submodules/LocationUI/Sources/LocationMapNode.swift b/submodules/LocationUI/Sources/LocationMapNode.swift
index 36f740995a..d3c265dc9c 100644
--- a/submodules/LocationUI/Sources/LocationMapNode.swift
+++ b/submodules/LocationUI/Sources/LocationMapNode.swift
@@ -334,7 +334,7 @@ public final class LocationMapNode: ASDisplayNode, MKMapViewDelegateTarget {
mapView.mapType = self.mapMode.mapType
mapView.isRotateEnabled = self.isRotateEnabled
mapView.showsUserLocation = true
- mapView.showsPointsOfInterest = false
+ mapView.pointOfInterestFilter = .excludingAll
mapView.showsCompass = false
mapView.customHitTest = { [weak self] point in
guard let strongSelf = self else {
diff --git a/submodules/PasscodeUI/Sources/PasscodeEntryController.swift b/submodules/PasscodeUI/Sources/PasscodeEntryController.swift
index 9eedf8738b..c850acb393 100644
--- a/submodules/PasscodeUI/Sources/PasscodeEntryController.swift
+++ b/submodules/PasscodeUI/Sources/PasscodeEntryController.swift
@@ -59,9 +59,6 @@ public final class PasscodeEntryController: ViewController {
private var inBackground: Bool = false
private var inBackgroundDisposable: Disposable?
- private var statusBarHost: StatusBarHost?
- private var previousStatusBarStyle: UIStatusBarStyle?
-
public init(applicationBindings: TelegramApplicationBindings, accountManager: AccountManager, appLockContext: AppLockContext, presentationData: PresentationData, presentationDataSignal: Signal, statusBarHost: StatusBarHost?, challengeData: PostboxAccessChallengeData, biometrics: PasscodeEntryControllerBiometricsMode, arguments: PasscodeEntryControllerPresentationArguments) {
self.applicationBindings = applicationBindings
self.accountManager = accountManager
@@ -72,19 +69,10 @@ public final class PasscodeEntryController: ViewController {
self.biometrics = biometrics
self.arguments = arguments
- self.statusBarHost = statusBarHost
- self.previousStatusBarStyle = statusBarHost?.statusBarStyle
super.init(navigationBarPresentationData: nil)
self.supportedOrientations = ViewControllerSupportedOrientations(regularSize: .all, compactSize: .portrait)
- self.statusBarHost?.setStatusBarStyle(.lightContent, animated: true)
- self.statusBarHost?.shouldChangeStatusBarStyle = { [weak self] style in
- if let strongSelf = self {
- strongSelf.previousStatusBarStyle = style
- return false
- }
- return true
- }
+ self.statusBar.updateStatusBarStyle(.White, animated: false)
self.presentationDataDisposable = (presentationDataSignal
|> deliverOnMainQueue).start(next: { [weak self] presentationData in
@@ -284,10 +272,6 @@ public final class PasscodeEntryController: ViewController {
}
public override func dismiss(completion: (() -> Void)? = nil) {
- self.statusBarHost?.shouldChangeStatusBarStyle = nil
- if let statusBarHost = self.statusBarHost, let previousStatusBarStyle = self.previousStatusBarStyle {
- statusBarHost.setStatusBarStyle(previousStatusBarStyle, animated: true)
- }
self.view.endEditing(true)
self.controllerNode.animateOut { [weak self] in
guard let strongSelf = self else {
diff --git a/submodules/TelegramCallsUI/Sources/CallKitIntegration.swift b/submodules/TelegramCallsUI/Sources/CallKitIntegration.swift
index 22f5047e08..74dc2a809c 100644
--- a/submodules/TelegramCallsUI/Sources/CallKitIntegration.swift
+++ b/submodules/TelegramCallsUI/Sources/CallKitIntegration.swift
@@ -92,7 +92,7 @@ public final class CallKitIntegration {
let handle = INPersonHandle(value: "tg\(peerId.id._internalGetInt64Value())", type: .unknown)
let contact = INPerson(personHandle: handle, nameComponents: nil, displayName: displayTitle, image: nil, contactIdentifier: localContactId, customIdentifier: "tg\(peerId.id._internalGetInt64Value())")
- let intent = INStartAudioCallIntent(destinationType: .normal, contacts: [contact])
+ let intent = INStartCallIntent(audioRoute: .unknown, destinationType: .normal, contacts: [contact], recordTypeForRedialing: .unknown, callCapability: .audioCall)
let interaction = INInteraction(intent: intent, response: nil)
interaction.direction = .outgoing
diff --git a/submodules/TelegramCore/Sources/Account/Account.swift b/submodules/TelegramCore/Sources/Account/Account.swift
index 3175e1573d..4836e5ece5 100644
--- a/submodules/TelegramCore/Sources/Account/Account.swift
+++ b/submodules/TelegramCore/Sources/Account/Account.swift
@@ -475,12 +475,11 @@ public func dataWithHexString(_ string: String) -> Data {
let subIndex = hex.index(hex.startIndex, offsetBy: 2)
let c = String(hex[..: Component {
self.contentSize = contentSize
self.ignoreDidScroll = false
}
- if self.scrollIndicatorInsets != component.contentInsets {
- self.scrollIndicatorInsets = component.contentInsets
+
+ let verticalScrollIndicatorInsets = UIEdgeInsets(top: component.contentInsets.top, left: 0.0, bottom: component.contentInsets.bottom, right: 0.0)
+ let horizontalScrollIndicatorInsets = UIEdgeInsets(top: 0.0, left: component.contentInsets.left, bottom: 0.0, right: component.contentInsets.right)
+
+ if self.verticalScrollIndicatorInsets != verticalScrollIndicatorInsets {
+ self.verticalScrollIndicatorInsets = verticalScrollIndicatorInsets
+ }
+ if self.horizontalScrollIndicatorInsets != horizontalScrollIndicatorInsets {
+ self.horizontalScrollIndicatorInsets = horizontalScrollIndicatorInsets
}
component.externalState?.contentHeight = contentSize.height
diff --git a/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/AutomaticBusinessMessageSetupScreen.swift b/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/AutomaticBusinessMessageSetupScreen.swift
index e5527d1b32..18b4d9d709 100644
--- a/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/AutomaticBusinessMessageSetupScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/AutomaticBusinessMessageSetupScreen.swift
@@ -1514,8 +1514,8 @@ final class AutomaticBusinessMessageSetupScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: 0.0, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
self.ignoreScrolling = false
diff --git a/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/BusinessLinksSetupScreen.swift b/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/BusinessLinksSetupScreen.swift
index 6fee2e2d3e..3c50137c67 100644
--- a/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/BusinessLinksSetupScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/AutomaticBusinessMessageSetupScreen/Sources/BusinessLinksSetupScreen.swift
@@ -630,8 +630,8 @@ final class BusinessLinksSetupScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: 0.0, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
if !previousBounds.isEmpty, !transition.animation.isImmediate {
diff --git a/submodules/TelegramUI/Components/Settings/BusinessHoursSetupScreen/Sources/BusinessDaySetupScreen.swift b/submodules/TelegramUI/Components/Settings/BusinessHoursSetupScreen/Sources/BusinessDaySetupScreen.swift
index 66fbf35d6b..a5dee4feb1 100644
--- a/submodules/TelegramUI/Components/Settings/BusinessHoursSetupScreen/Sources/BusinessDaySetupScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/BusinessHoursSetupScreen/Sources/BusinessDaySetupScreen.swift
@@ -592,8 +592,8 @@ final class BusinessDaySetupScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: 0.0, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
if !previousBounds.isEmpty, !transition.animation.isImmediate {
diff --git a/submodules/TelegramUI/Components/Settings/BusinessHoursSetupScreen/Sources/BusinessHoursSetupScreen.swift b/submodules/TelegramUI/Components/Settings/BusinessHoursSetupScreen/Sources/BusinessHoursSetupScreen.swift
index f1b2d19657..ce6e3fa77e 100644
--- a/submodules/TelegramUI/Components/Settings/BusinessHoursSetupScreen/Sources/BusinessHoursSetupScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/BusinessHoursSetupScreen/Sources/BusinessHoursSetupScreen.swift
@@ -792,8 +792,8 @@ final class BusinessHoursSetupScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: 0.0, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
self.ignoreScrolling = false
diff --git a/submodules/TelegramUI/Components/Settings/BusinessIntroSetupScreen/Sources/BusinessIntroSetupScreen.swift b/submodules/TelegramUI/Components/Settings/BusinessIntroSetupScreen/Sources/BusinessIntroSetupScreen.swift
index df8ae9b171..61afafa1a6 100644
--- a/submodules/TelegramUI/Components/Settings/BusinessIntroSetupScreen/Sources/BusinessIntroSetupScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/BusinessIntroSetupScreen/Sources/BusinessIntroSetupScreen.swift
@@ -1106,8 +1106,8 @@ final class BusinessIntroSetupScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: 0.0, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
if !previousBounds.isEmpty, !transition.animation.isImmediate {
diff --git a/submodules/TelegramUI/Components/Settings/BusinessLocationSetupScreen/Sources/BusinessLocationSetupScreen.swift b/submodules/TelegramUI/Components/Settings/BusinessLocationSetupScreen/Sources/BusinessLocationSetupScreen.swift
index 4d9fe5574c..07a79ee025 100644
--- a/submodules/TelegramUI/Components/Settings/BusinessLocationSetupScreen/Sources/BusinessLocationSetupScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/BusinessLocationSetupScreen/Sources/BusinessLocationSetupScreen.swift
@@ -579,8 +579,8 @@ final class BusinessLocationSetupScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: 0.0, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
if !previousBounds.isEmpty, !transition.animation.isImmediate {
diff --git a/submodules/TelegramUI/Components/Settings/ChatbotSetupScreen/Sources/BusinessRecipientListScreen.swift b/submodules/TelegramUI/Components/Settings/ChatbotSetupScreen/Sources/BusinessRecipientListScreen.swift
index 41aa2a0321..9c967cecd3 100644
--- a/submodules/TelegramUI/Components/Settings/ChatbotSetupScreen/Sources/BusinessRecipientListScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/ChatbotSetupScreen/Sources/BusinessRecipientListScreen.swift
@@ -622,8 +622,8 @@ final class BusinessRecipientListScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: 0.0, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
if !previousBounds.isEmpty, !transition.animation.isImmediate {
diff --git a/submodules/TelegramUI/Components/Settings/ChatbotSetupScreen/Sources/ChatbotSetupScreen.swift b/submodules/TelegramUI/Components/Settings/ChatbotSetupScreen/Sources/ChatbotSetupScreen.swift
index f4caaa6672..5fd3236f4a 100644
--- a/submodules/TelegramUI/Components/Settings/ChatbotSetupScreen/Sources/ChatbotSetupScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/ChatbotSetupScreen/Sources/ChatbotSetupScreen.swift
@@ -1318,8 +1318,8 @@ final class ChatbotSetupScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: 0.0, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
if !previousBounds.isEmpty, !transition.animation.isImmediate {
diff --git a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ChannelAppearanceScreen.swift b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ChannelAppearanceScreen.swift
index 8213aa5d9d..59e1b089eb 100644
--- a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ChannelAppearanceScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/ChannelAppearanceScreen.swift
@@ -1831,8 +1831,8 @@ final class ChannelAppearanceScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: availableSize.height - bottomPanelFrame.minY, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
if !previousBounds.isEmpty, !transition.animation.isImmediate {
diff --git a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/UserApperanceScreen.swift b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/UserApperanceScreen.swift
index 303da9e6ba..1eba83a146 100644
--- a/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/UserApperanceScreen.swift
+++ b/submodules/TelegramUI/Components/Settings/PeerNameColorScreen/Sources/UserApperanceScreen.swift
@@ -1196,8 +1196,8 @@ final class UserAppearanceScreenComponent: Component {
self.scrollView.contentSize = contentSize
}
let scrollInsets = UIEdgeInsets(top: environment.navigationHeight, left: 0.0, bottom: availableSize.height - bottomPanelFrame.minY, right: 0.0)
- if self.scrollView.scrollIndicatorInsets != scrollInsets {
- self.scrollView.scrollIndicatorInsets = scrollInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollInsets
}
if !previousBounds.isEmpty, !transition.animation.isImmediate {
diff --git a/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/CountriesMultiselectionScreen.swift b/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/CountriesMultiselectionScreen.swift
index 94ffc18a84..ddb1aafd17 100644
--- a/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/CountriesMultiselectionScreen.swift
+++ b/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/CountriesMultiselectionScreen.swift
@@ -966,8 +966,8 @@ final class CountriesMultiselectionScreenComponent: Component {
}
let contentInset: UIEdgeInsets = UIEdgeInsets(top: 0.0, left: 0.0, bottom: bottomPanelHeight + bottomPanelInset, right: 0.0)
let indicatorInset = UIEdgeInsets(top: max(itemLayout.containerInset, environment.safeInsets.top + navigationHeight), left: 0.0, bottom: contentInset.bottom, right: 0.0)
- if indicatorInset != self.scrollView.scrollIndicatorInsets {
- self.scrollView.scrollIndicatorInsets = indicatorInset
+ if indicatorInset != self.scrollView.verticalScrollIndicatorInsets {
+ self.scrollView.verticalScrollIndicatorInsets = indicatorInset
}
if contentInset != self.scrollView.contentInset {
self.scrollView.contentInset = contentInset
diff --git a/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/ShareWithPeersScreen.swift b/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/ShareWithPeersScreen.swift
index 1c656cd9be..13c4b9cd64 100644
--- a/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/ShareWithPeersScreen.swift
+++ b/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/ShareWithPeersScreen.swift
@@ -2988,8 +2988,8 @@ final class ShareWithPeersScreenComponent: Component {
}
let contentInset: UIEdgeInsets = UIEdgeInsets(top: 0.0, left: 0.0, bottom: bottomPanelHeight + bottomPanelInset, right: 0.0)
let indicatorInset = UIEdgeInsets(top: max(itemLayout.containerInset, environment.safeInsets.top + navigationHeight), left: 0.0, bottom: contentInset.bottom, right: 0.0)
- if indicatorInset != self.scrollView.scrollIndicatorInsets {
- self.scrollView.scrollIndicatorInsets = indicatorInset
+ if indicatorInset != self.scrollView.verticalScrollIndicatorInsets {
+ self.scrollView.verticalScrollIndicatorInsets = indicatorInset
}
if contentInset != self.scrollView.contentInset {
self.scrollView.contentInset = contentInset
diff --git a/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift b/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift
index 65e069f264..d4dd8e3d61 100644
--- a/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift
+++ b/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift
@@ -675,7 +675,7 @@ final class StarsTransactionsListPanelComponent: Component {
if self.scrollView.contentSize != contentSize {
self.scrollView.contentSize = contentSize
}
- self.scrollView.scrollIndicatorInsets = environment.containerInsets
+ self.scrollView.verticalScrollIndicatorInsets = environment.containerInsets
if !transition.animation.isImmediate && self.scrollView.bounds.minY != contentOffset {
let deltaOffset = self.scrollView.bounds.minY - contentOffset
transition.animateBoundsOrigin(view: self.scrollView, from: CGPoint(x: 0.0, y: -deltaOffset), to: CGPoint(), additive: true)
diff --git a/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageFileListPanelComponent.swift b/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageFileListPanelComponent.swift
index 771c64a641..1b80afc5b6 100644
--- a/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageFileListPanelComponent.swift
+++ b/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageFileListPanelComponent.swift
@@ -1053,7 +1053,7 @@ final class StorageFileListPanelComponent: Component {
if self.scrollView.contentSize != contentSize {
self.scrollView.contentSize = contentSize
}
- self.scrollView.scrollIndicatorInsets = environment.containerInsets
+ self.scrollView.verticalScrollIndicatorInsets = environment.containerInsets
if !transition.animation.isImmediate && self.scrollView.bounds.minY != contentOffset {
let deltaOffset = self.scrollView.bounds.minY - contentOffset
transition.animateBoundsOrigin(view: self.scrollView, from: CGPoint(x: 0.0, y: -deltaOffset), to: CGPoint(), additive: true)
diff --git a/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageMediaGridPanelComponent.swift b/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageMediaGridPanelComponent.swift
index 1768007949..3330f4b82f 100644
--- a/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageMediaGridPanelComponent.swift
+++ b/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageMediaGridPanelComponent.swift
@@ -641,7 +641,7 @@ final class StorageMediaGridPanelComponent: Component {
if self.scrollView.contentSize != contentSize {
self.scrollView.contentSize = contentSize
}
- self.scrollView.scrollIndicatorInsets = environment.containerInsets
+ self.scrollView.verticalScrollIndicatorInsets = environment.containerInsets
if !transition.animation.isImmediate && self.scrollView.bounds.minY != contentOffset {
let deltaOffset = self.scrollView.bounds.minY - contentOffset
transition.animateBoundsOrigin(view: self.scrollView, from: CGPoint(x: 0.0, y: -deltaOffset), to: CGPoint(), additive: true)
diff --git a/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StoragePeerListPanelComponent.swift b/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StoragePeerListPanelComponent.swift
index 620045ae87..818ac08da7 100644
--- a/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StoragePeerListPanelComponent.swift
+++ b/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StoragePeerListPanelComponent.swift
@@ -683,7 +683,7 @@ final class StoragePeerListPanelComponent: Component {
if self.scrollView.contentSize != contentSize {
self.scrollView.contentSize = contentSize
}
- self.scrollView.scrollIndicatorInsets = environment.containerInsets
+ self.scrollView.verticalScrollIndicatorInsets = environment.containerInsets
if !transition.animation.isImmediate && self.scrollView.bounds.minY != contentOffset {
let deltaOffset = self.scrollView.bounds.minY - contentOffset
transition.animateBoundsOrigin(view: self.scrollView, from: CGPoint(x: 0.0, y: -deltaOffset), to: CGPoint(), additive: true)
diff --git a/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageUsageScreen.swift b/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageUsageScreen.swift
index 6f62e684de..ef99d1a960 100644
--- a/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageUsageScreen.swift
+++ b/submodules/TelegramUI/Components/StorageUsageScreen/Sources/StorageUsageScreen.swift
@@ -1006,7 +1006,7 @@ final class StorageUsageScreenComponent: Component {
} else {
let style: UIActivityIndicatorView.Style
if environment.theme.overallDarkAppearance {
- style = .whiteLarge
+ style = .large
} else {
if #available(iOS 13.0, *) {
style = .large
diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetViewListComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetViewListComponent.swift
index ebda94d2e7..39bf05b8cb 100644
--- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetViewListComponent.swift
+++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetViewListComponent.swift
@@ -1047,8 +1047,8 @@ final class StoryItemSetViewListComponent: Component {
if self.scrollView.contentInset != scrollContentInsets {
self.scrollView.contentInset = scrollContentInsets
}
- if self.scrollView.scrollIndicatorInsets != scrollIndicatorInsets {
- self.scrollView.scrollIndicatorInsets = scrollIndicatorInsets
+ if self.scrollView.verticalScrollIndicatorInsets != scrollIndicatorInsets {
+ self.scrollView.verticalScrollIndicatorInsets = scrollIndicatorInsets
}
if self.scrollView.contentSize != scrollContentSize {
self.scrollView.contentSize = scrollContentSize
diff --git a/submodules/TelegramUI/Sources/AppDelegate.swift b/submodules/TelegramUI/Sources/AppDelegate.swift
index a28067e1b4..bab31cd422 100644
--- a/submodules/TelegramUI/Sources/AppDelegate.swift
+++ b/submodules/TelegramUI/Sources/AppDelegate.swift
@@ -84,38 +84,48 @@ private func isKeyboardViewContainer(view: NSObject) -> Bool {
}
private class ApplicationStatusBarHost: StatusBarHost {
- private let application = UIApplication.shared
+ private let scene: UIWindowScene
+
+ init(scene: UIWindowScene) {
+ self.scene = scene
+ }
var isApplicationInForeground: Bool {
- switch self.application.applicationState {
+ switch self.scene.activationState {
+ case .unattached:
+ return false
+ case .foregroundActive:
+ return true
+ case .foregroundInactive:
+ return true
case .background:
return false
- default:
- return true
+ @unknown default:
+ return false
}
}
var statusBarFrame: CGRect {
- return self.application.statusBarFrame
+ return self.scene.statusBarManager?.statusBarFrame ?? CGRect()
}
var statusBarStyle: UIStatusBarStyle {
get {
- return self.application.statusBarStyle
+ return self.scene.statusBarManager?.statusBarStyle ?? .default
} set(value) {
self.setStatusBarStyle(value, animated: false)
}
}
func setStatusBarStyle(_ style: UIStatusBarStyle, animated: Bool) {
- if self.shouldChangeStatusBarStyle?(style) ?? true {
+ /*if self.shouldChangeStatusBarStyle?(style) ?? true {
self.application.internalSetStatusBarStyle(style, animated: animated)
- }
+ }*/
}
var shouldChangeStatusBarStyle: ((UIStatusBarStyle) -> Bool)?
func setStatusBarHidden(_ value: Bool, animated: Bool) {
- self.application.internalSetStatusBarHidden(value, animation: animated ? .fade : .none)
+ //self.application.internalSetStatusBarHidden(value, animation: animated ? .fade : .none)
}
var keyboardWindow: UIWindow? {
@@ -158,17 +168,13 @@ protocol SupportedStartCallIntent {
var contacts: [INPerson]? { get }
}
-@available(iOS 10.0, *)
-extension INStartAudioCallIntent: SupportedStartCallIntent {}
+extension INStartCallIntent: SupportedStartCallIntent {}
protocol SupportedStartVideoCallIntent {
@available(iOS 10.0, *)
var contacts: [INPerson]? { get }
}
-@available(iOS 10.0, *)
-extension INStartVideoCallIntent: SupportedStartVideoCallIntent {}
-
private enum QueuedWakeup: Int32 {
case call
case backgroundLocation
@@ -235,7 +241,6 @@ private func extractAccountManagerState(records: AccountRecordsView(false)
private let sharedContextPromise = Promise()
- //private let watchCommunicationManagerPromise = Promise()
private var accountManager: AccountManager?
private var accountManagerState: AccountManagerState?
@@ -339,8 +344,8 @@ private func extractAccountManagerState(records: AccountRecordsView 44.0, transition.isAnimated {
diff --git a/submodules/ffmpeg/Sources/FFMpeg/build-ffmpeg-bazel.sh b/submodules/ffmpeg/Sources/FFMpeg/build-ffmpeg-bazel.sh
index 55ef4eb969..9b1eae9c11 100755
--- a/submodules/ffmpeg/Sources/FFMpeg/build-ffmpeg-bazel.sh
+++ b/submodules/ffmpeg/Sources/FFMpeg/build-ffmpeg-bazel.sh
@@ -73,7 +73,7 @@ fi
COMPILE="y"
-DEPLOYMENT_TARGET="12.0"
+DEPLOYMENT_TARGET="13.0"
LIBS_HASH=""
for ARCH in $ARCHS
diff --git a/third-party/libjxl/build-libjxl-bazel.sh b/third-party/libjxl/build-libjxl-bazel.sh
index 993dbf929f..d63765f2af 100755
--- a/third-party/libjxl/build-libjxl-bazel.sh
+++ b/third-party/libjxl/build-libjxl-bazel.sh
@@ -14,7 +14,7 @@ CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_BE
if [ "$ARCH" = "arm64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneOS.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
- export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=12.0 -funwind-tables"
+ export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=13.0 -funwind-tables"
export CXXFLAGS="$CFLAGS"
cd "$BUILD_DIR"
@@ -31,7 +31,7 @@ if [ "$ARCH" = "arm64" ]; then
elif [ "$ARCH" = "sim_arm64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneSimulator.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneSimulator*.sdk)
- export CFLAGS="-Wall -arch arm64 --target=arm64-apple-ios12.0-simulator -miphonesimulator-version-min=12.0 -funwind-tables"
+ export CFLAGS="-Wall -arch arm64 --target=arm64-apple-ios13.0-simulator -miphonesimulator-version-min=13.0 -funwind-tables"
export CXXFLAGS="$CFLAGS"
cd "$BUILD_DIR"
@@ -48,7 +48,7 @@ elif [ "$ARCH" = "sim_arm64" ]; then
elif [ "$ARCH" = "x86_64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneSimulator.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneSimulator*.sdk)
- export CFLAGS="-Wall -arch x86_64 -miphoneos-version-min=12.0 -funwind-tables"
+ export CFLAGS="-Wall -arch x86_64 -miphoneos-version-min=13.0 -funwind-tables"
export CXXFLAGS="$CFLAGS"
cd "$BUILD_DIR"
diff --git a/third-party/libx264/build-libx264-bazel.sh b/third-party/libx264/build-libx264-bazel.sh
index 29d73daa68..1bd34b04c5 100755
--- a/third-party/libx264/build-libx264-bazel.sh
+++ b/third-party/libx264/build-libx264-bazel.sh
@@ -13,7 +13,7 @@ SCRATCH="$BUILD_DIR/scratch"
#set -e
#devnull='> /dev/null 2>&1'
-DEPLOYMENT_TARGET="9.0"
+DEPLOYMENT_TARGET="13.0"
CONFIGURE_FLAGS="--enable-static --enable-pic --disable-cli --bit-depth=8 --disable-opencl"
echo "building $RAW_ARCH..."
diff --git a/third-party/mozjpeg/build-mozjpeg-bazel.sh b/third-party/mozjpeg/build-mozjpeg-bazel.sh
index 3b73ba8564..c8621e5901 100755
--- a/third-party/mozjpeg/build-mozjpeg-bazel.sh
+++ b/third-party/mozjpeg/build-mozjpeg-bazel.sh
@@ -10,7 +10,7 @@ BUILD_DIR=$(echo "$(cd "$(dirname "$3")"; pwd -P)/$(basename "$3")")
if [ "$ARCH" = "armv7" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneOS.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
- export CFLAGS="-mfloat-abi=softfp -arch armv7 -miphoneos-version-min=9.0"
+ export CFLAGS="-mfloat-abi=softfp -arch armv7 -miphoneos-version-min=13.0"
export ASMFLAGS="-no-integrated-as"
cd "$BUILD_DIR"
@@ -27,7 +27,7 @@ if [ "$ARCH" = "armv7" ]; then
elif [ "$ARCH" = "arm64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneOS.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
- export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=9.0 -funwind-tables"
+ export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=13.0 -funwind-tables"
cd "$BUILD_DIR"
mkdir build
@@ -43,7 +43,7 @@ elif [ "$ARCH" = "arm64" ]; then
elif [ "$ARCH" = "sim_arm64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneSimulator.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneSimulator*.sdk)
- export CFLAGS="-Wall -arch arm64 --target=arm64-apple-ios9.0-simulator -miphonesimulator-version-min=9.0 -funwind-tables"
+ export CFLAGS="-Wall -arch arm64 --target=arm64-apple-ios13.0-simulator -miphonesimulator-version-min=13.0 -funwind-tables"
cd "$BUILD_DIR"
mkdir build
@@ -59,7 +59,7 @@ elif [ "$ARCH" = "sim_arm64" ]; then
elif [ "$ARCH" = "x86_64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneSimulator.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneSimulator*.sdk)
- export CFLAGS="-Wall -arch x86_64 -miphoneos-version-min=9.0 -funwind-tables"
+ export CFLAGS="-Wall -arch x86_64 -miphoneos-version-min=13.0 -funwind-tables"
cd "$BUILD_DIR"
mkdir build
diff --git a/third-party/opus/build-opus-bazel.sh b/third-party/opus/build-opus-bazel.sh
index cbeb018910..60c2246a61 100755
--- a/third-party/opus/build-opus-bazel.sh
+++ b/third-party/opus/build-opus-bazel.sh
@@ -6,7 +6,7 @@ ARCH="$1"
BUILD_DIR=$(echo "$(cd "$(dirname "$2")"; pwd -P)/$(basename "$2")")
SOURCE_CODE_ARCHIVE="$3"
-MINIOSVERSION="11.0"
+MINIOSVERSION="13.0"
OPT_CFLAGS="-Os -g"
OPT_LDFLAGS=""
diff --git a/third-party/td/build-td-bazel.sh b/third-party/td/build-td-bazel.sh
index df4d257c4a..756fe808d1 100755
--- a/third-party/td/build-td-bazel.sh
+++ b/third-party/td/build-td-bazel.sh
@@ -15,6 +15,7 @@ options="$options -DOPENSSL_FOUND=1"
options="$options -DOPENSSL_CRYPTO_LIBRARY=${openssl_crypto_library}"
options="$options -DOPENSSL_INCLUDE_DIR=${OPENSSL_DIR}/src/include"
options="$options -DCMAKE_BUILD_TYPE=Release"
+options="$options -DIOS_DEPLOYMENT_TARGET=13.0"
cd "$BUILD_DIR"
@@ -28,11 +29,11 @@ cd ..
if [ "$ARCH" = "arm64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneOS.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
- export CFLAGS="-arch arm64 -miphoneos-version-min=12.0"
+ export CFLAGS="-arch arm64 -miphoneos-version-min=13.0"
elif [ "$ARCH" = "sim_arm64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneSimulator.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneSimulator*.sdk)
- export CFLAGS="-arch arm64 --target=arm64-apple-ios12.0-simulator -miphonesimulator-version-min=12.0"
+ export CFLAGS="-arch arm64 --target=arm64-apple-ios13.0-simulator -miphonesimulator-version-min=13.0"
else
echo "Unsupported architecture $ARCH"
exit 1
diff --git a/third-party/webp/build-webp-bazel.sh b/third-party/webp/build-webp-bazel.sh
index 2964d42873..7a3d123187 100755
--- a/third-party/webp/build-webp-bazel.sh
+++ b/third-party/webp/build-webp-bazel.sh
@@ -14,7 +14,7 @@ COMMON_ARGS="-DWEBP_LINK_STATIC=1 -DWEBP_BUILD_CWEBP=0 -DWEBP_BUILD_DWEBP=0 -DWE
if [ "$ARCH" = "arm64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneOS.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
- export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=12.0 -funwind-tables"
+ export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=13.0 -funwind-tables"
cd "$BUILD_DIR"
mkdir build
@@ -30,7 +30,7 @@ if [ "$ARCH" = "arm64" ]; then
elif [ "$ARCH" = "sim_arm64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneSimulator.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneSimulator*.sdk)
- export CFLAGS="-Wall -arch arm64 --target=arm64-apple-ios12.0-simulator -miphonesimulator-version-min=12.0 -funwind-tables"
+ export CFLAGS="-Wall -arch arm64 --target=arm64-apple-ios13.0-simulator -miphonesimulator-version-min=13.0 -funwind-tables"
cd "$BUILD_DIR"
mkdir build
@@ -46,7 +46,7 @@ elif [ "$ARCH" = "sim_arm64" ]; then
elif [ "$ARCH" = "x86_64" ]; then
IOS_PLATFORMDIR="$(xcode-select -p)/Platforms/iPhoneSimulator.platform"
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneSimulator*.sdk)
- export CFLAGS="-Wall -arch x86_64 -miphoneos-version-min=12.0 -funwind-tables"
+ export CFLAGS="-Wall -arch x86_64 -miphoneos-version-min=13.0 -funwind-tables"
cd "$BUILD_DIR"
mkdir build