mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge commit 'f1ef6f438a53d566e850629d34685bb9254d2ea3'
This commit is contained in:
commit
e1626c11af
@ -960,17 +960,6 @@ public final class ManagedAudioSession: NSObject {
|
||||
try AVAudioSession.sharedInstance().overrideOutputAudioPort(.none)
|
||||
}
|
||||
|
||||
if case let .record(_, video, _) = type, video, let input = AVAudioSession.sharedInstance().availableInputs?.first {
|
||||
if let dataSources = input.dataSources {
|
||||
for source in dataSources {
|
||||
if source.dataSourceName.contains("Front") {
|
||||
try? input.setPreferredDataSource(source)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if resetToBuiltin {
|
||||
var updatedType = type
|
||||
if case .record(false, let video, let withOthers) = updatedType, self.isHeadsetPluggedInValue {
|
||||
|
@ -14,6 +14,10 @@ private func fullEntityMediaPath(_ path: String) -> String {
|
||||
}
|
||||
|
||||
public final class DrawingStickerEntity: DrawingEntity, Codable {
|
||||
public enum DecodingError: Error {
|
||||
case generic
|
||||
}
|
||||
|
||||
public enum Content: Equatable {
|
||||
public enum ImageType: Equatable {
|
||||
case sticker
|
||||
@ -262,7 +266,7 @@ public final class DrawingStickerEntity: DrawingEntity, Codable {
|
||||
} else if let file = try container.decodeIfPresent(TelegramMediaFile.self, forKey: .videoFile) {
|
||||
self.content = .video(file)
|
||||
} else {
|
||||
fatalError()
|
||||
throw DrawingStickerEntity.DecodingError.generic
|
||||
}
|
||||
self.referenceDrawingSize = try container.decode(CGSize.self, forKey: .referenceDrawingSize)
|
||||
self.position = try container.decode(CGPoint.self, forKey: .position)
|
||||
|
Loading…
x
Reference in New Issue
Block a user