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-10-14 12:42:57 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b992e17533b5796612c2864d75f914ca8bd10339
b992e175
1 parent
11f15ba4
fix CcmsOffer banners at gfy, mfy
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
b992e17
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
View file @
b992e17
...
...
@@ -197,6 +197,8 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
public
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"InboxTableViewCellId"
,
for
:
indexPath
)
as!
InboxTableViewCell
let
isCcmsOffer
=
(
campaigns
[
indexPath
.
row
]
.
ccms_offer
!=
nil
)
&&
(
campaigns
[
indexPath
.
row
]
.
ccms_offer
!=
""
)
&&
(
campaigns
[
indexPath
.
row
]
.
ccms_offer
==
"true"
)
if
(
campaigns
[
indexPath
.
row
]
.
_type
!=
nil
&&
campaigns
[
indexPath
.
row
]
.
_type
==
"telco"
)
{
let
ccmsCampaigns
=
swiftApi
()
.
getCCMSLoyaltyCampaigns
()
...
...
@@ -211,6 +213,21 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
}
}
}
else
if
(
campaigns
[
indexPath
.
row
]
.
session_uuid
!=
nil
&&
campaigns
[
indexPath
.
row
]
.
session_uuid
!=
""
&&
isCcmsOffer
)
{
let
ccmsCampaigns
=
swiftApi
()
.
getCCMSLoyaltyCampaigns
()
let
loyaltyCampaignIdExists
=
ccmsCampaigns
.
contains
{
$0
.
_loyaltyCampaignId
==
campaigns
[
indexPath
.
row
]
.
session_uuid
}
if
(
loyaltyCampaignIdExists
==
true
)
{
var
ccmsCampaignFound
:
swiftApi
.
LoyaltyContextualOfferModel
=
swiftApi
.
LoyaltyContextualOfferModel
()
for
item
in
ccmsCampaigns
{
if
(
item
.
_loyaltyCampaignId
==
campaigns
[
indexPath
.
row
]
.
session_uuid
)
{
cell
.
configureCell
(
ccms
:
item
)
break
;
}
}
}
}
else
{
cell
.
configureCell
(
campaign
:
campaigns
[
indexPath
.
row
])
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
View file @
b992e17
...
...
@@ -235,6 +235,8 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"MFYInboxTableViewCellId"
,
for
:
indexPath
)
as!
MFYInboxTableViewCell
let
campaign
=
categories
[
indexPath
.
section
]
.
items
[
indexPath
.
row
]
let
isCcmsOffer
=
(
campaign
.
ccms_offer
!=
nil
)
&&
(
campaign
.
ccms_offer
!=
""
)
&&
(
campaign
.
ccms_offer
==
"true"
)
if
(
campaign
.
_type
!=
nil
&&
campaign
.
_type
==
"telco"
)
{
let
ccmsCampaigns
=
swiftApi
()
.
getCCMSLoyaltyCampaigns
()
...
...
@@ -249,6 +251,21 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
}
}
}
else
if
(
campaign
.
session_uuid
!=
nil
&&
campaign
.
session_uuid
!=
""
&&
isCcmsOffer
)
{
let
ccmsCampaigns
=
swiftApi
()
.
getCCMSLoyaltyCampaigns
()
let
loyaltyCampaignIdExists
=
ccmsCampaigns
.
contains
{
$0
.
_loyaltyCampaignId
==
campaign
.
session_uuid
}
if
(
loyaltyCampaignIdExists
==
true
)
{
var
ccmsCampaignFound
:
swiftApi
.
LoyaltyContextualOfferModel
=
swiftApi
.
LoyaltyContextualOfferModel
()
for
item
in
ccmsCampaigns
{
if
(
item
.
_loyaltyCampaignId
==
campaign
.
session_uuid
)
{
cell
.
configureCell
(
ccms
:
item
)
break
;
}
}
}
}
else
{
cell
.
configureCell
(
campaign
:
campaign
)
}
...
...
Please
register
or
login
to post a comment