Skip to content

Commit 9927abd

Browse files
committed
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
2 parents 0b448bf + a775b2c commit 9927abd

File tree

2 files changed

+27
-24
lines changed

2 files changed

+27
-24
lines changed

submodules/GalleryUI/Sources/GalleryController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,8 @@ public class GalleryController: ViewController, StandalonePresentableController,
792792
let syncResult = Atomic<(Bool, (() -> Void)?)>(value: (false, nil))
793793
self.disposable.set(combineLatest(
794794
messageView,
795-
self.context.account.postbox.preferencesView(keys: [PreferencesKeys.appConfiguration]),
796-
translateToLanguage
795+
self.context.account.postbox.preferencesView(keys: [PreferencesKeys.appConfiguration]) |> take(1),
796+
translateToLanguage |> take(1)
797797
).start(next: { [weak self] view, preferencesView, translateToLanguage in
798798
let f: () -> Void = {
799799
if let strongSelf = self {

submodules/TelegramUI/Sources/AppDelegate.swift

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,30 +2400,33 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
24002400
}
24012401

24022402
private func reportFailedIncomingCallKitCall() {
2403-
guard let callKitIntegration = CallKitIntegration.shared else {
2404-
return
2405-
}
2406-
let uuid = CallSessionInternalId()
2407-
callKitIntegration.reportIncomingCall(
2408-
uuid: uuid,
2409-
stableId: Int64.random(in: Int64.min ... Int64.max),
2410-
handle: "Unknown",
2411-
phoneNumber: nil,
2412-
isVideo: false,
2413-
displayTitle: "Unknown",
2414-
completion: { error in
2415-
if let error = error {
2416-
if error.domain == "com.apple.CallKit.error.incomingcall" && (error.code == -3 || error.code == 3) {
2417-
Logger.shared.log("PresentationCall", "reportFailedIncomingCallKitCall device in DND mode")
2418-
} else {
2419-
Logger.shared.log("PresentationCall", "reportFailedIncomingCallKitCall error \(error)")
2403+
if #available(iOS 14.4, *) {
2404+
} else {
2405+
guard let callKitIntegration = CallKitIntegration.shared else {
2406+
return
2407+
}
2408+
let uuid = CallSessionInternalId()
2409+
callKitIntegration.reportIncomingCall(
2410+
uuid: uuid,
2411+
stableId: Int64.random(in: Int64.min ... Int64.max),
2412+
handle: "Unknown",
2413+
phoneNumber: nil,
2414+
isVideo: false,
2415+
displayTitle: "Unknown",
2416+
completion: { error in
2417+
if let error = error {
2418+
if error.domain == "com.apple.CallKit.error.incomingcall" && (error.code == -3 || error.code == 3) {
2419+
Logger.shared.log("PresentationCall", "reportFailedIncomingCallKitCall device in DND mode")
2420+
} else {
2421+
Logger.shared.log("PresentationCall", "reportFailedIncomingCallKitCall error \(error)")
2422+
}
24202423
}
24212424
}
2422-
}
2423-
)
2424-
Queue.mainQueue().after(1.0, {
2425-
callKitIntegration.dropCall(uuid: uuid)
2426-
})
2425+
)
2426+
Queue.mainQueue().after(1.0, {
2427+
callKitIntegration.dropCall(uuid: uuid)
2428+
})
2429+
}
24272430
}
24282431

24292432
private func authorizedContext() -> Signal<AuthorizedApplicationContext, NoError> {

0 commit comments

Comments
 (0)