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-08-31 16:09:51 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c2ae30fc547fbfd2e825ee56175573f35d201990
c2ae30fc
1 parent
c48b12ef
shared coupons refreshed at CouponsVC, WalletVC
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
13 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CouponsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponsViewController.swift
View file @
c2ae30f
...
...
@@ -36,8 +36,15 @@ import SwiftEventBus
tableView
.
contentInset
.
top
=
50
}
public
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
self
.
coupons
=
swiftApi
()
.
getCouponList
()
self
.
tableView
.
reloadData
()
}
// MARK: - API Functions
func
getCouponsRequest
()
{
swiftApi
()
.
getCouponsAsync
(
getCouponsCallback
)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
View file @
c2ae30f
...
...
@@ -191,18 +191,16 @@ import UIKit
if
(
response
?
.
getStatus
==
1
)
{
self
.
showDialog
(
"Συγχαρητήρια!"
,
"Μόλις έκανες δώρο ένα κουπόνι!"
)
// swiftApi().getCouponsAsync(getCouponsCallback)
//
// func getCouponsCallback (_ couponsData: Array<swiftApi.CouponItemModel>?) -> Void {
// if (couponsData != nil) {
//
// DispatchQueue.main.async {
// print("========= getCouponsRequest SUCCESSSS CouponViewController =========")
// }
// } else {
// print("========= getCouponsRequest ERROR CouponViewController =========")
// }
// }
swiftApi
()
.
getCouponsAsync
(
getCouponsCallback
)
func
getCouponsCallback
(
_
couponsData
:
Array
<
swiftApi
.
CouponItemModel
>
?)
->
Void
{
if
(
couponsData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
}
}
else
{
}
}
}
else
{
self
.
showDialog
(
"Αποτυχία"
,
"Κάτι πήγε στραβά"
)
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
c2ae30f
...
...
@@ -316,6 +316,9 @@ import SwiftEventBus
}
questionnaireButton
.
layer
.
cornerRadius
=
7.0
}
self
.
coupons
=
swiftApi
()
.
getCouponList
()
self
.
tableView
.
reloadData
()
}
public
override
func
viewDidLayoutSubviews
()
{
...
...
@@ -362,6 +365,7 @@ import SwiftEventBus
}
@IBAction
func
dfyEarnButtonAction
(
_
sender
:
Any
)
{
print
(
"DFY coupon banner pressed!"
)
// analysis_pressed event
let
dealsAnalysis
=
swiftApi
.
WarplyDealsAnalysisEventModel
()
dealsAnalysis
.
_isPressed
=
true
...
...
Please
register
or
login
to post a comment