Manos Chorianopoulos

delete questionnaire campaign if user has userTag

No preview for this file type
......@@ -2012,7 +2012,12 @@ public class swiftApi {
}
public func setCampaignList(_ campaigns: Array<CampaignItemModel>) -> Void {
GlobalVariables.campaigns = campaigns
let userTag = self.getUserTag()
if ((userTag != nil) && (userTag != "")) {
GlobalVariables.campaigns = campaigns.filter { $0.offer_category != "questionnaire" }
} else {
GlobalVariables.campaigns = campaigns
}
}
......@@ -2141,7 +2146,13 @@ public class swiftApi {
public func setUniqueCampaignList(_ campaigns: Array<CampaignItemModel>) -> Void {
GlobalVariables.campaigns = campaigns
let userTag = self.getUserTag()
if ((userTag != nil) && (userTag != "")) {
GlobalVariables.campaigns = campaigns.filter { $0.offer_category != "questionnaire" }
} else {
GlobalVariables.campaigns = campaigns
}
}
......