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-09-15 12:26:12 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85aaec0a7eed441b1cdc7849e9b6c6036ae4635c
85aaec0a
1 parent
45e13731
fix questionnaire shown when answered
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
85aaec0
...
...
@@ -19,6 +19,7 @@ public struct GlobalVariables {
static
var
couponSetList
:
Array
<
swiftApi
.
CouponSetItemModel
>
=
[]
static
var
loyaltyBadge
:
swiftApi
.
LoyaltyBadgeModel
=
swiftApi
.
LoyaltyBadgeModel
()
static
var
consumer
:
swiftApi
.
ProfileModel
?
static
var
consumerInternal
:
swiftApi
.
ProfileModel
?
static
var
ccmsCampaigns
:
Array
<
swiftApi
.
LoyaltyContextualOfferModel
>
=
[]
static
var
dealsSum
:
Float
=
0.0
static
var
seasonalList
:
Array
<
swiftApi
.
LoyaltyGiftsForYouPackage
>
=
[]
...
...
@@ -1135,7 +1136,7 @@ public class swiftApi {
return
(
!
(
isCcmsOffer
||
isTelco
))
}
if
(
swiftApi
()
.
getConsumer
()?
.
_answered
==
true
)
{
if
(
swiftApi
()
.
getConsumer
Internal
()?
.
_answered
==
true
)
{
filteredCampaigns
=
filteredCampaigns
.
filter
{
$0
.
offer_category
!=
"questionnaire"
}
}
...
...
@@ -2201,6 +2202,7 @@ public class swiftApi {
let
tempProfile
=
ProfileModel
(
dictionary
:
profileDataResult
)
swiftApi
()
.
setConsumer
(
tempProfile
??
swiftApi
.
ProfileModel
())
swiftApi
()
.
setConsumerInternal
(
tempProfile
??
swiftApi
.
ProfileModel
())
swiftApi
()
.
setUserTag
(
tempProfile
.
_badge
??
""
)
swiftApi
()
.
setUserNonTelco
(
tempProfile
.
_nonTelco
??
false
)
...
...
@@ -2288,6 +2290,7 @@ public class swiftApi {
if
(
profileData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
swiftApi
()
.
setConsumer
(
profileData
??
swiftApi
.
ProfileModel
())
swiftApi
()
.
setConsumerInternal
(
profileData
??
swiftApi
.
ProfileModel
())
swiftApi
()
.
setUserTag
(
profileData
?
.
_badge
??
""
)
}
}
else
{
...
...
@@ -3761,7 +3764,7 @@ public class swiftApi {
return
(
!
(
isCcmsOffer
||
isTelco
))
}
if
(
swiftApi
()
.
getConsumer
()?
.
_answered
==
true
)
{
if
(
swiftApi
()
.
getConsumer
Internal
()?
.
_answered
==
true
)
{
filteredCampaigns
=
filteredCampaigns
.
filter
{
$0
.
offer_category
!=
"questionnaire"
}
}
...
...
@@ -3974,6 +3977,16 @@ public class swiftApi {
return
GlobalVariables
.
consumer
}
public
func
setConsumerInternal
(
_
profile
:
ProfileModel
)
{
GlobalVariables
.
consumerInternal
=
profile
}
public
func
getConsumerInternal
()
->
ProfileModel
?
{
return
GlobalVariables
.
consumerInternal
}
public
func
setDealsCouponsSum
(
_
sum
:
Float
)
{
GlobalVariables
.
dealsSum
=
sum
...
...
Please
register
or
login
to post a comment