Manos Chorianopoulos

CampaignViewController optimizations

...@@ -798,15 +798,20 @@ var timer2: DispatchSourceTimer? ...@@ -798,15 +798,20 @@ var timer2: DispatchSourceTimer?
798 SwiftEventBus.post("refresh_vouchers") 798 SwiftEventBus.post("refresh_vouchers")
799 // SwiftEventBus.post("open_my_rewards") 799 // SwiftEventBus.post("open_my_rewards")
800 800
801 - swiftApi().getUnifiedCouponsDeals { unifiedCoupons in
802 let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) 801 let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
803 let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponsViewController") as! SwiftWarplyFramework.UnifiedCouponsViewController 802 let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponsViewController") as! SwiftWarplyFramework.UnifiedCouponsViewController
803 + vc.isFromCampaignVC = true
804 self.navigationController?.pushViewController(vc, animated: true) 804 self.navigationController?.pushViewController(vc, animated: true)
805 - } failureCallback: { errorCode in 805 +
806 - let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) 806 + // swiftApi().getUnifiedCouponsDeals { unifiedCoupons in
807 - let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponsViewController") as! SwiftWarplyFramework.UnifiedCouponsViewController 807 + // let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
808 - self.navigationController?.pushViewController(vc, animated: true) 808 + // let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponsViewController") as! SwiftWarplyFramework.UnifiedCouponsViewController
809 - } 809 + // self.navigationController?.pushViewController(vc, animated: true)
810 + // } failureCallback: { errorCode in
811 + // let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
812 + // let vc = storyboard.instantiateViewController(withIdentifier: "UnifiedCouponsViewController") as! SwiftWarplyFramework.UnifiedCouponsViewController
813 + // self.navigationController?.pushViewController(vc, animated: true)
814 + // }
810 815
811 // let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) 816 // let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
812 // let vc = storyboard.instantiateViewController(withIdentifier: "WalletViewController") as! SwiftWarplyFramework.WalletViewController 817 // let vc = storyboard.instantiateViewController(withIdentifier: "WalletViewController") as! SwiftWarplyFramework.WalletViewController
......
...@@ -21,6 +21,7 @@ import SwiftEventBus ...@@ -21,6 +21,7 @@ import SwiftEventBus
21 public var unifiedCoupons:Array<swiftApi.UnifiedCouponModel> = [] 21 public var unifiedCoupons:Array<swiftApi.UnifiedCouponModel> = []
22 public var smCoupons:Array<swiftApi.CouponItemModel> = [] 22 public var smCoupons:Array<swiftApi.CouponItemModel> = []
23 public var smCouponsSelected:Array<swiftApi.CouponItemModel> = [] 23 public var smCouponsSelected:Array<swiftApi.CouponItemModel> = []
24 + public var isFromCampaignVC: Bool = false
24 25
25 // A reference to the Select All image view for later use 26 // A reference to the Select All image view for later use
26 var circleImageView: UIImageView! 27 var circleImageView: UIImageView!
...@@ -131,6 +132,12 @@ import SwiftEventBus ...@@ -131,6 +132,12 @@ import SwiftEventBus
131 } 132 }
132 133
133 self.navigationController?.hideHairline() 134 self.navigationController?.hideHairline()
135 +
136 + if (self.isFromCampaignVC == true) {
137 + swiftApi().getUnifiedCouponsDeals { unifiedCoupons in
138 + } failureCallback: { errorCode in
139 + }
140 + }
134 } 141 }
135 142
136 // MARK: - Functions 143 // MARK: - Functions
......