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
2023-06-12 11:39:48 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7cbd731646c7c6e9593626040c2996c67205c008
7cbd7316
1 parent
5fb4eab5
Add coupons_fetched event listener to WalletVC
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/WalletBannersTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletBannersTableViewCell.swift
View file @
7cbd731
...
...
@@ -116,6 +116,8 @@ import UIKit
func
configureCell
(
totalCouponValue
:
Float
,
totalCouponDiscount
:
Float
,
unifiedCouponsDiscount
:
Float
,
forYouExpanded
:
Bool
)
{
loyaltyBadge
=
swiftApi
()
.
getLoyaltyBadge
()
if
(
forYouExpanded
==
false
)
{
sumBannerArrowImage
.
image
=
UIImage
(
named
:
"ic_down_dark_2"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
7cbd731
...
...
@@ -72,7 +72,7 @@ import SwiftEventBus
var
seconds
:
Int
=
0
var
totalCouponValue
=
swiftApi
()
.
getDealsCouponsSum
()
let
totalCouponDiscount
=
Float
(
round
(
100
*
swiftApi
()
.
getLoyaltyBadge
()
.
_value
)
/
100
)
var
totalCouponDiscount
=
Float
(
round
(
100
*
swiftApi
()
.
getLoyaltyBadge
()
.
_value
)
/
100
)
var
unifiedCouponsDiscount
:
Float
=
0.0
var
forYouExpanded
:
Bool
=
false
;
...
...
@@ -82,6 +82,16 @@ import SwiftEventBus
self
.
hidesBottomBarWhenPushed
=
true
SwiftEventBus
.
onBackgroundThread
(
self
,
name
:
"coupons_fetched"
)
{
result
in
DispatchQueue
.
main
.
async
{
self
.
coupons
=
swiftApi
()
.
getCouponList
()
self
.
totalCouponDiscount
=
Float
(
round
(
100
*
swiftApi
()
.
getLoyaltyBadge
()
.
_value
)
/
100
)
self
.
loyaltyBadge
=
swiftApi
()
.
getLoyaltyBadge
()
self
.
tableView
.
reloadData
()
}
}
// TODO: DELETE ===>
// let coupon = swiftApi.ActiveDFYCouponModel()
// coupon._value = "12"
...
...
Please
register
or
login
to post a comment