Merge commit '6be3c2e694b81c6b8fe661ae79c14e41e626a52f'

This commit is contained in:
Ali 2023-07-07 02:04:21 +04:00
commit 328049a053
4 changed files with 21 additions and 10 deletions

View File

@ -106,14 +106,16 @@ final class CameraDevice {
if let bestFormat = candidates.last {
device.activeFormat = bestFormat
Logger.shared.log("Camera", "Available formats:")
for format in device.formats {
Logger.shared.log("Camera", format.description)
}
Logger.shared.log("Camera", "Selected format:")
Logger.shared.log("Camera", bestFormat.description)
} else {
Logger.shared.log("Camera", "No format selected")
}
Logger.shared.log("Camera", "Available formats:")
for format in device.formats {
Logger.shared.log("Camera", format.description)
}
if let targetFPS = device.actualFPS(maxFramerate) {

View File

@ -799,9 +799,10 @@ private final class StoryContainerScreenComponent: Component {
if currentItemView.hasActiveDeactivateableInput() {
currentItemView.deactivateInput()
} else {
if location.x < currentItemView.frame.minX {
let itemViewFrame = currentItemView.convert(currentItemView.bounds, to: self)
if location.x < itemViewFrame.minX {
self.navigate(direction: .previous)
} else if location.x > currentItemView.frame.maxX {
} else if location.x > itemViewFrame.maxX {
self.navigate(direction: .next)
}
}

View File

@ -17433,7 +17433,11 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}, joinVoiceChat: { [weak self] peerId, invite, call in
self?.joinGroupCall(peerId: peerId, invite: invite, activeCall: EngineGroupCallDescription(call))
}, present: { [weak self] c, a in
self?.present(c, in: .window(.root), with: a)
if c is UndoOverlayController {
self?.present(c, in: .current)
} else {
self?.present(c, in: .window(.root), with: a)
}
}, dismissInput: { [weak self] in
self?.chatDisplayNode.dismissInput()
}, contentContext: nil)

View File

@ -834,7 +834,11 @@ func openResolvedUrlImpl(_ resolvedUrl: ResolvedUrl, context: AccountContext, ur
})
} else {
//TODO:localize
present(UndoOverlayController(presentationData: presentationData, content: .universal(animation: "story_expired", scale: 0.066, colors: [:], title: nil, text: "This story does not exist", customUndoText: nil, timeout: nil), elevatedLayout: true, animateInAsReplacement: false, action: { _ in
var elevatedLayout = true
if case .chat = urlContext {
elevatedLayout = false
}
present(UndoOverlayController(presentationData: presentationData, content: .universal(animation: "story_expired", scale: 0.066, colors: [:], title: nil, text: "This story does not exist", customUndoText: nil, timeout: nil), elevatedLayout: elevatedLayout, animateInAsReplacement: false, action: { _ in
return true
}), nil)
}