mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
9927abd73a
@ -792,8 +792,8 @@ public class GalleryController: ViewController, StandalonePresentableController,
|
|||||||
let syncResult = Atomic<(Bool, (() -> Void)?)>(value: (false, nil))
|
let syncResult = Atomic<(Bool, (() -> Void)?)>(value: (false, nil))
|
||||||
self.disposable.set(combineLatest(
|
self.disposable.set(combineLatest(
|
||||||
messageView,
|
messageView,
|
||||||
self.context.account.postbox.preferencesView(keys: [PreferencesKeys.appConfiguration]),
|
self.context.account.postbox.preferencesView(keys: [PreferencesKeys.appConfiguration]) |> take(1),
|
||||||
translateToLanguage
|
translateToLanguage |> take(1)
|
||||||
).start(next: { [weak self] view, preferencesView, translateToLanguage in
|
).start(next: { [weak self] view, preferencesView, translateToLanguage in
|
||||||
let f: () -> Void = {
|
let f: () -> Void = {
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
|
@ -2400,30 +2400,33 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func reportFailedIncomingCallKitCall() {
|
private func reportFailedIncomingCallKitCall() {
|
||||||
guard let callKitIntegration = CallKitIntegration.shared else {
|
if #available(iOS 14.4, *) {
|
||||||
return
|
} else {
|
||||||
}
|
guard let callKitIntegration = CallKitIntegration.shared else {
|
||||||
let uuid = CallSessionInternalId()
|
return
|
||||||
callKitIntegration.reportIncomingCall(
|
}
|
||||||
uuid: uuid,
|
let uuid = CallSessionInternalId()
|
||||||
stableId: Int64.random(in: Int64.min ... Int64.max),
|
callKitIntegration.reportIncomingCall(
|
||||||
handle: "Unknown",
|
uuid: uuid,
|
||||||
phoneNumber: nil,
|
stableId: Int64.random(in: Int64.min ... Int64.max),
|
||||||
isVideo: false,
|
handle: "Unknown",
|
||||||
displayTitle: "Unknown",
|
phoneNumber: nil,
|
||||||
completion: { error in
|
isVideo: false,
|
||||||
if let error = error {
|
displayTitle: "Unknown",
|
||||||
if error.domain == "com.apple.CallKit.error.incomingcall" && (error.code == -3 || error.code == 3) {
|
completion: { error in
|
||||||
Logger.shared.log("PresentationCall", "reportFailedIncomingCallKitCall device in DND mode")
|
if let error = error {
|
||||||
} else {
|
if error.domain == "com.apple.CallKit.error.incomingcall" && (error.code == -3 || error.code == 3) {
|
||||||
Logger.shared.log("PresentationCall", "reportFailedIncomingCallKitCall error \(error)")
|
Logger.shared.log("PresentationCall", "reportFailedIncomingCallKitCall device in DND mode")
|
||||||
|
} else {
|
||||||
|
Logger.shared.log("PresentationCall", "reportFailedIncomingCallKitCall error \(error)")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
)
|
||||||
)
|
Queue.mainQueue().after(1.0, {
|
||||||
Queue.mainQueue().after(1.0, {
|
callKitIntegration.dropCall(uuid: uuid)
|
||||||
callKitIntegration.dropCall(uuid: uuid)
|
})
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func authorizedContext() -> Signal<AuthorizedApplicationContext, NoError> {
|
private func authorizedContext() -> Signal<AuthorizedApplicationContext, NoError> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user