Showing
3 changed files
with
14 additions
and
0 deletions
... | @@ -43,6 +43,12 @@ import SwiftEventBus | ... | @@ -43,6 +43,12 @@ import SwiftEventBus |
43 | self.campaigns = swiftApi().mergeGFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns()) | 43 | self.campaigns = swiftApi().mergeGFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns()) |
44 | self.tableView.reloadData() | 44 | self.tableView.reloadData() |
45 | } | 45 | } |
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 | + } | ||
46 | 52 | ||
47 | tableView.clipsToBounds = true | 53 | tableView.clipsToBounds = true |
48 | tableView.layer.cornerRadius = 30 | 54 | tableView.layer.cornerRadius = 30 | ... | ... |
... | @@ -32,6 +32,12 @@ import SwiftEventBus | ... | @@ -32,6 +32,12 @@ import SwiftEventBus |
32 | self.campaigns = swiftApi().mergeMFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns()) | 32 | self.campaigns = swiftApi().mergeMFYCCMSLoyaltyCampaigns(campaigns: swiftApi().getCCMSLoyaltyCampaigns()) |
33 | self.tableView.reloadData() | 33 | self.tableView.reloadData() |
34 | } | 34 | } |
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 | + } | ||
35 | 41 | ||
36 | tableView.clipsToBounds = true | 42 | tableView.clipsToBounds = true |
37 | tableView.layer.cornerRadius = 30 | 43 | tableView.layer.cornerRadius = 30 | ... | ... |
... | @@ -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