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-06 18:55:54 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
76796f388363e8c7acc3a16a76725588eba3d8a0
76796f38
1 parent
4b2b4cb6
update MFYViewController
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
21 deletions
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
View file @
76796f3
...
...
@@ -12,7 +12,7 @@ import UIKit
@IBOutlet
weak
var
mainView
:
UIView
!
@IBOutlet
weak
var
tableView
:
UITableView
!
public
var
campaigns
:
Array
<
swiftApi
.
CampaignItemModel
>
=
[]
public
var
campaigns
:
Array
<
swiftApi
.
CampaignItemModel
>
=
swiftApi
()
.
mergeMFYCCMSLoyaltyCampaigns
(
campaigns
:
swiftApi
()
.
getCCMSLoyaltyCampaigns
())
public
override
func
viewDidLoad
()
{
...
...
@@ -20,8 +20,6 @@ import UIKit
self
.
hidesBottomBarWhenPushed
=
true
getCampaignsRequest
()
setBackButton
()
setNavigationTitle
(
"MORE for YOU"
)
...
...
@@ -41,24 +39,6 @@ import UIKit
}
func
getCampaignsRequest
()
{
swiftApi
()
.
getCampaignsAsync
(
getCampaignsCallback
)
}
func
getCampaignsCallback
(
_
campaignsData
:
Array
<
swiftApi
.
CampaignItemModel
>
?)
->
Void
{
if
(
campaignsData
!=
nil
)
{
self
.
campaigns
=
campaignsData
?
.
filter
{
$0
.
offer_category
==
"more_for_you"
}
??
[]
DispatchQueue
.
main
.
async
{
self
.
tableView
.
reloadData
()
swiftApi
()
.
setUniqueCampaignList
(
campaignsData
??
[])
}
}
else
{
self
.
campaigns
=
[]
}
}
}
// MARK: - TableView
...
...
Please
register
or
login
to post a comment