Manos Chorianopoulos

possible fix for disappearing campaigns on back

......@@ -13,7 +13,13 @@ import SwiftEventBus
@IBOutlet weak var mainView: UIView!
@IBOutlet weak var tableView: UITableView!
public var campaigns:Array<swiftApi.CampaignItemModel> = []
public var campaigns:Array<swiftApi.CampaignItemModel> = [] {
didSet {
DispatchQueue.main.async {
self.tableView.reloadData()
}
}
}
public var seasonalList:Array<swiftApi.LoyaltyGiftsForYouPackage> = swiftApi().getSeasonalList()
public var ccmsList:Array<swiftApi.LoyaltyContextualOfferModel> = swiftApi().getCCMSLoyaltyCampaigns()
public var loyaltyList:Array<swiftApi.CampaignItemModel> = swiftApi().mergeGFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns())
......
......@@ -13,7 +13,13 @@ import SwiftEventBus
@IBOutlet weak var mainView: UIView!
@IBOutlet weak var tableView: UITableView!
var categories: Array<CampaignCategory> = [CampaignCategory]()
var categories: Array<CampaignCategory> = [CampaignCategory]() {
didSet {
DispatchQueue.main.async {
self.tableView.reloadData()
}
}
}
public var campaigns:Array<swiftApi.CampaignItemModel> = []
public var loyaltyList:Array<swiftApi.CampaignItemModel> = swiftApi().mergeMFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns())
......