mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Merge commit '77a592a05c9e599c3dcedb59c1fadc70699bd2e6' into background-task
This commit is contained in:
@@ -92,7 +92,7 @@ public func presentPeerReportOptions(context: AccountContext, parent: ViewContro
|
||||
})
|
||||
}
|
||||
} else {
|
||||
parent?.present(peerReportController(context: context, subject: subject, completion: completion), in: .window(.root), with: ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
||||
parent?.push(peerReportController(context: context, subject: subject, completion: completion))
|
||||
}
|
||||
f(.dismissWithoutContent)
|
||||
})))
|
||||
@@ -103,11 +103,13 @@ public func presentPeerReportOptions(context: AccountContext, parent: ViewContro
|
||||
parent.view.endEditing(true)
|
||||
parent.present(peerReportOptionsController(context: context, subject: subject, present: { [weak parent] c, a in
|
||||
parent?.present(c, in: .window(.root), with: a)
|
||||
}, push: { [weak parent] c in
|
||||
parent?.push(c)
|
||||
}, completion: completion), in: .window(.root))
|
||||
}
|
||||
}
|
||||
|
||||
public func peerReportOptionsController(context: AccountContext, subject: PeerReportSubject, present: @escaping (ViewController, Any?) -> Void, completion: @escaping (Bool) -> Void) -> ViewController {
|
||||
public func peerReportOptionsController(context: AccountContext, subject: PeerReportSubject, present: @escaping (ViewController, Any?) -> Void, push: @escaping (ViewController) -> Void, completion: @escaping (Bool) -> Void) -> ViewController {
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
let controller = ActionSheetController(theme: ActionSheetControllerTheme(presentationTheme: presentationData.theme))
|
||||
|
||||
@@ -170,7 +172,7 @@ public func peerReportOptionsController(context: AccountContext, subject: PeerRe
|
||||
})
|
||||
}
|
||||
} else {
|
||||
controller?.present(peerReportController(context: context, subject: subject, completion: completion), in: .window(.root), with: ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
||||
push(peerReportController(context: context, subject: subject, completion: completion))
|
||||
}
|
||||
|
||||
controller?.dismissAnimated()
|
||||
@@ -349,6 +351,7 @@ private func peerReportController(context: AccountContext, subject: PeerReportSu
|
||||
}
|
||||
|
||||
let controller = ItemListController(context: context, state: signal)
|
||||
controller.navigationPresentation = .modal
|
||||
presentControllerImpl = { [weak controller] c, a in
|
||||
controller?.present(c, in: .window(.root), with: a)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user