Various improvements

This commit is contained in:
Ilya Laktyushin
2025-05-20 22:30:48 +02:00
parent 62f156440f
commit 81e11d6d36
102 changed files with 3073 additions and 558 deletions

View File

@@ -1491,12 +1491,12 @@ public final class WebAppController: ViewController, AttachmentContainable {
isPeerArchived: false,
transitionOut: nil
)
let controller = self.context.sharedContext.makeStoryMediaEditorScreen(context: self.context, source: source, text: text, link: linkUrl.flatMap { ($0, linkName) }, completion: { result, commit in
let target: Stories.PendingTarget = result.target
let controller = self.context.sharedContext.makeStoryMediaEditorScreen(context: self.context, source: source, text: text, link: linkUrl.flatMap { ($0, linkName) }, completion: { results, commit in
let target: Stories.PendingTarget = results.first!.target
externalState.storyTarget = target
if let rootController = self.context.sharedContext.mainWindow?.viewController as? TelegramRootControllerInterface {
rootController.proceedWithStoryUpload(target: target, results: [result], existingMedia: nil, forwardInfo: nil, externalState: externalState, commit: commit)
rootController.proceedWithStoryUpload(target: target, results: results, existingMedia: nil, forwardInfo: nil, externalState: externalState, commit: commit)
}
})
if let navigationController = self.controller?.getNavigationController() {