mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various improvements
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user