mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix build
This commit is contained in:
parent
f312275425
commit
8571aaa0a2
@ -328,7 +328,10 @@ public final class LegacyPaintEntityRenderer: NSObject, TGPhotoPaintEntityRender
|
||||
var result: Double
|
||||
let minDuration: Double = 3.0
|
||||
if durations.count > 1 {
|
||||
result = min(6.0, Double(durations.reduce(1.0) { Double(lcm(Int32($0 * 10.0), Int32($1 * 10.0))) }) / 10.0)
|
||||
let reduced = durations.reduce(1.0) { lhs, rhs -> Double in
|
||||
return Double(lcm(Int32(lhs * 10.0), Int32(rhs * 10.0)))
|
||||
}
|
||||
result = min(6.0, Double(reduced) / 10.0)
|
||||
} else if let duration = durations.first {
|
||||
result = duration
|
||||
} else {
|
||||
|
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* You cannot directly instantiate an `STPToken`. You should only use one that has been returned from an `STPAPIClient` callback.
|
||||
*/
|
||||
- (nonnull instancetype) init __attribute__((unavailable("You cannot directly instantiate an STPToken. You should only use one that has been returned from an STPAPIClient callback.")));
|
||||
- (nonnull instancetype) init;
|
||||
|
||||
/**
|
||||
* The value of the token. You can store this value on your server and use it to make charges and customers. @see
|
||||
|
@ -1306,7 +1306,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
strongSelf.requestCall(movingFromBroadcastToRtc: false)
|
||||
}
|
||||
}
|
||||
}, outgoingAudioBitrateKbit: outgoingAudioBitrateKbit, enableVideo: self.isVideoEnabled, enableNoiseSuppression: enableNoiseSuppression)
|
||||
}, outgoingAudioBitrateKbit: outgoingAudioBitrateKbit, videoContentType: self.isVideoEnabled ? .generic : .none, enableNoiseSuppression: enableNoiseSuppression)
|
||||
self.incomingVideoSourcePromise.set(callContext.videoSources
|
||||
|> deliverOnMainQueue
|
||||
|> map { [weak self] sources -> [PeerId: UInt32] in
|
||||
|
@ -3178,17 +3178,23 @@ public final class VoiceChatController: ViewController {
|
||||
}
|
||||
|
||||
@objc private func cameraPressed() {
|
||||
let controller = voiceChatCameraPreviewController(sharedContext: self.context.sharedContext, account: self.context.account, forceTheme: self.darkTheme, title: self.presentationData.strings.VoiceChat_VideoPreviewTitle, text: self.presentationData.strings.VoiceChat_VideoPreviewDescription, apply: {
|
||||
|
||||
})
|
||||
self.controller?.present(controller, in: .window(.root))
|
||||
|
||||
return
|
||||
if self.call.isVideo {
|
||||
self.call.disableVideo()
|
||||
} else {
|
||||
self.call.requestVideo()
|
||||
}
|
||||
return;
|
||||
let controller = voiceChatCameraPreviewController(sharedContext: self.context.sharedContext, account: self.context.account, forceTheme: self.darkTheme, title: self.presentationData.strings.VoiceChat_VideoPreviewTitle, text: self.presentationData.strings.VoiceChat_VideoPreviewDescription, apply: { [weak self] in
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
}
|
||||
if strongSelf.call.isVideo {
|
||||
strongSelf.call.disableVideo()
|
||||
} else {
|
||||
strongSelf.call.requestVideo()
|
||||
}
|
||||
})
|
||||
self.controller?.present(controller, in: .window(.root))
|
||||
}
|
||||
|
||||
@objc private func switchCameraPressed() {
|
||||
|
@ -869,12 +869,22 @@ private:
|
||||
|
||||
tgcalls::VideoContentType _videoContentType;
|
||||
switch (videoContentType) {
|
||||
case OngoingGroupCallVideoContentTypeGeneric:
|
||||
case OngoingGroupCallVideoContentTypeGeneric: {
|
||||
_videoContentType = tgcalls::VideoContentType::Generic;
|
||||
case OngoingGroupCallVideoContentTypeScreencast:
|
||||
break;
|
||||
}
|
||||
case OngoingGroupCallVideoContentTypeScreencast: {
|
||||
_videoContentType = tgcalls::VideoContentType::Screencast;
|
||||
case OngoingGroupCallVideoContentTypeNone:
|
||||
break;
|
||||
}
|
||||
case OngoingGroupCallVideoContentTypeNone: {
|
||||
_videoContentType = tgcalls::VideoContentType::None;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
_videoContentType = tgcalls::VideoContentType::None;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
__weak GroupCallThreadLocalContext *weakSelf = self;
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 205ae79b9d61ac0a9707b98635d8f244732e6ad6
|
||||
Subproject commit 909612ca66cef26deffa5dc2dcd964ddde1b4c11
|
Loading…
x
Reference in New Issue
Block a user