Merge commit 'f1ef6f438a53d566e850629d34685bb9254d2ea3'

This commit is contained in:
Isaac 2024-02-02 19:45:39 +01:00
commit e1626c11af
2 changed files with 5 additions and 12 deletions

View File

@ -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 {

View File

@ -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)