Manos Chorianopoulos

add view controller on box_analysis_pressed event

......@@ -419,7 +419,7 @@ import SwiftEventBus
print("BOX coupon banner pressed!")
// box_analysis_pressed event
let dealsAnalysis = swiftApi.WarplyBoxAnalysisEventModel()
let dealsAnalysis = swiftApi.WarplyBoxAnalysisEventModel(self)
dealsAnalysis._isPressed = true
SwiftEventBus.post("box_analysis_pressed", sender: dealsAnalysis)
// SwiftEventBus.post("box_analysis_pressed")
......
......@@ -4922,9 +4922,11 @@ public class swiftApi {
public class WarplyBoxAnalysisEventModel {
private var isPressed: Bool
private var vc: UIViewController
public init() {
public init(_ controller: UIViewController) {
self.isPressed = false
self.vc = controller
}
public var _isPressed: Bool {
......@@ -4935,6 +4937,15 @@ public class swiftApi {
self.isPressed = newValue
}
}
public var _vc: UIViewController {
get { // getter
return self.vc
}
set(newValue) { //setter
self.vc = newValue
}
}
}
......