diff --git a/submodules/Camera/Sources/CameraDevice.swift b/submodules/Camera/Sources/CameraDevice.swift index 13ea9b216d..5aeccc34b1 100644 --- a/submodules/Camera/Sources/CameraDevice.swift +++ b/submodules/Camera/Sources/CameraDevice.swift @@ -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) { diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryContainerScreen.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryContainerScreen.swift index 13510c5b78..165db01fe4 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryContainerScreen.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryContainerScreen.swift @@ -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) } } diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 6ce5b423e9..2bc20c676c 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -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) diff --git a/submodules/TelegramUI/Sources/OpenResolvedUrl.swift b/submodules/TelegramUI/Sources/OpenResolvedUrl.swift index 29c939b14a..a309ebbf59 100644 --- a/submodules/TelegramUI/Sources/OpenResolvedUrl.swift +++ b/submodules/TelegramUI/Sources/OpenResolvedUrl.swift @@ -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) }