Showing
3 changed files
with
14 additions
and
0 deletions
... | @@ -44,6 +44,12 @@ import SwiftEventBus | ... | @@ -44,6 +44,12 @@ import SwiftEventBus |
44 | self.tableView.reloadData() | 44 | self.tableView.reloadData() |
45 | } | 45 | } |
46 | 46 | ||
47 | + SwiftEventBus.onMainThread(self, name: "campaigns_retrieved") { result in | ||
48 | + print("===== SwiftEventBus campaigns_retrieved =====") | ||
49 | + self.campaigns = swiftApi().mergeGFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns()) | ||
50 | + self.tableView.reloadData() | ||
51 | + } | ||
52 | + | ||
47 | tableView.clipsToBounds = true | 53 | tableView.clipsToBounds = true |
48 | tableView.layer.cornerRadius = 30 | 54 | tableView.layer.cornerRadius = 30 |
49 | tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 55 | tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | ... | ... |
... | @@ -33,6 +33,12 @@ import SwiftEventBus | ... | @@ -33,6 +33,12 @@ import SwiftEventBus |
33 | self.tableView.reloadData() | 33 | self.tableView.reloadData() |
34 | } | 34 | } |
35 | 35 | ||
36 | + SwiftEventBus.onMainThread(self, name: "campaigns_retrieved") { result in | ||
37 | + print("===== SwiftEventBus campaigns_retrieved =====") | ||
38 | + self.campaigns = swiftApi().mergeMFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns()) | ||
39 | + self.tableView.reloadData() | ||
40 | + } | ||
41 | + | ||
36 | tableView.clipsToBounds = true | 42 | tableView.clipsToBounds = true |
37 | tableView.layer.cornerRadius = 30 | 43 | tableView.layer.cornerRadius = 30 |
38 | tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | 44 | tableView.layer.maskedCorners = [ .layerMinXMinYCorner] // Top left corner radius | ... | ... |
... | @@ -795,6 +795,8 @@ public class swiftApi { | ... | @@ -795,6 +795,8 @@ public class swiftApi { |
795 | 795 | ||
796 | swiftApi().setUniqueCampaignList(campaignsArray) | 796 | swiftApi().setUniqueCampaignList(campaignsArray) |
797 | 797 | ||
798 | + SwiftEventBus.post("campaigns_retrieved") | ||
799 | + | ||
798 | let filteredCampaigns = campaignsArray.filter { | 800 | let filteredCampaigns = campaignsArray.filter { |
799 | let tempCampaign = $0 | 801 | let tempCampaign = $0 |
800 | let isCcmsOffer = (tempCampaign.ccms_offer != nil) && (tempCampaign.ccms_offer != "") && (tempCampaign.ccms_offer == "true") | 802 | let isCcmsOffer = (tempCampaign.ccms_offer != nil) && (tempCampaign.ccms_offer != "") && (tempCampaign.ccms_offer == "true") | ... | ... |
-
Please register or login to post a comment