mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Send logs via share
This commit is contained in:
@@ -23,6 +23,7 @@ import PresentationDataUtils
|
||||
import ChatImportUI
|
||||
import ZipArchive
|
||||
import ActivityIndicator
|
||||
import DebugSettingsUI
|
||||
|
||||
private let inForeground = ValuePromise<Bool>(false, ignoreRepeated: true)
|
||||
|
||||
@@ -393,6 +394,16 @@ public class ShareRootControllerImpl {
|
||||
shareController.dismissed = { _ in
|
||||
self?.getExtensionContext()?.completeRequest(returningItems: nil, completionHandler: nil)
|
||||
}
|
||||
shareController.debugAction = {
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
}
|
||||
let presentationData = internalContext.sharedContext.currentPresentationData.with { $0 }
|
||||
let navigationController = NavigationController(mode: .single, theme: NavigationControllerTheme(presentationTheme: presentationData.theme))
|
||||
strongSelf.navigationController = navigationController
|
||||
navigationController.viewControllers = [debugController(sharedContext: context.sharedContext, context: context)]
|
||||
strongSelf.mainWindow?.present(navigationController, on: .root)
|
||||
}
|
||||
|
||||
cancelImpl = { [weak shareController] in
|
||||
shareController?.dismiss(completion: { [weak self] in
|
||||
|
||||
Reference in New Issue
Block a user