Various improvements

This commit is contained in:
Ilya Laktyushin
2025-11-06 13:55:58 +04:00
parent 481419ced0
commit b559663d6a
12 changed files with 215 additions and 206 deletions

View File

@@ -316,6 +316,17 @@ public final class TelegramRootController: NavigationController, TelegramRootCon
transitionOut: nil
)
let mediaEditorCustomTarget = customTarget.flatMap { value -> EnginePeer.Id? in
switch value {
case .myStories:
return nil
case let .peer(id):
return id
case let .botPreview(id, _):
return id
}
}
var presentImpl: ((ViewController) -> Void)?
var returnToCameraImpl: (() -> Void)?
var dismissCameraImpl: (() -> Void)?
@@ -323,6 +334,7 @@ public final class TelegramRootController: NavigationController, TelegramRootCon
let cameraController = CameraScreenImpl(
context: context,
mode: .story,
customTarget: mediaEditorCustomTarget,
transitionIn: transitionIn.flatMap {
if let sourceView = $0.sourceView {
return CameraScreenImpl.TransitionIn(
@@ -410,17 +422,6 @@ public final class TelegramRootController: NavigationController, TelegramRootCon
transitionIn = .camera
}
let mediaEditorCustomTarget = customTarget.flatMap { value -> EnginePeer.Id? in
switch value {
case .myStories:
return nil
case let .peer(id):
return id
case let .botPreview(id, _):
return id
}
}
let controller = MediaEditorScreenImpl(
context: context,
mode: .storyEditor(remainingCount: storyRemainingCount ?? 1),