Get information text as a parameter in threads beta view

This commit is contained in:
ismailgulek
2022-04-19 13:10:17 +03:00
parent 1c359eef6c
commit b6f9b178bc
4 changed files with 14 additions and 7 deletions
@@ -38,6 +38,7 @@ final class ThreadsBetaCoordinatorBridgePresenter: NSObject {
// MARK: Private
public let threadId: String
public let infoText: String
private let slidingModalPresenter = SlidingModalPresenter()
private var coordinator: ThreadsBetaCoordinator?
@@ -47,8 +48,9 @@ final class ThreadsBetaCoordinatorBridgePresenter: NSObject {
// MARK: - Setup
init(threadId: String) {
init(threadId: String, infoText: String) {
self.threadId = threadId
self.infoText = infoText
super.init()
}
@@ -56,7 +58,7 @@ final class ThreadsBetaCoordinatorBridgePresenter: NSObject {
func present(from viewController: UIViewController, animated: Bool) {
let threadsBetaCoordinator = ThreadsBetaCoordinator(threadId: threadId)
let threadsBetaCoordinator = ThreadsBetaCoordinator(threadId: threadId, infoText: infoText)
threadsBetaCoordinator.delegate = self
guard let presentable = threadsBetaCoordinator.toPresentable() as? SlidingModalPresentable.ViewControllerType else {
MXLog.error("[ThreadsBetaCoordinatorBridgePresenter] Presentable is not 'SlidingModalPresentable'")