Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-07-19 14:30:50 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8d7bd21bbd311b030ee490850f5a614a26075309
8d7bd21b
1 parent
16513e91
fix getCouponsAsync, getCampaignsAsync callbacks
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
8d7bd21
...
...
@@ -397,7 +397,9 @@ public class swiftApi {
// On CouponSets request Success, match coupons with couponsets
let
tempCoupons
=
matchCoupons
()
swiftApi
()
.
setCouponList
(
tempCoupons
)
getCouponsCallback
(
tempCoupons
)
let
activeCoupons
=
coupons
.
filter
({
return
$0
.
status
==
1
})
getCouponsCallback
(
activeCoupons
)
}
func
couponSetsFailureCallback
(
_
error
:
Error
?)
->
Void
{
...
...
@@ -700,7 +702,14 @@ public class swiftApi {
}
swiftApi
()
.
setUniqueCampaignList
(
campaignsArray
)
getCampaignsCallback
(
campaignsArray
);
let
filteredCampaigns
=
campaignsArray
.
filter
{
let
tempCampaign
=
$0
let
isCcmsOffer
=
(
tempCampaign
.
ccms_offer
!=
nil
)
&&
(
tempCampaign
.
ccms_offer
!=
""
)
&&
(
tempCampaign
.
ccms_offer
==
"true"
)
return
(
!
isCcmsOffer
)
}
getCampaignsCallback
(
filteredCampaigns
);
}
func
campaignsFailureCallback
(
_
error
:
Error
?)
->
Void
{
...
...
Please
register
or
login
to post a comment