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
2024-05-29 14:15:37 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d257ce098d17902d709a50082751d5bb902b1e01
d257ce09
1 parent
e0a156fc
fix MyRewards to show coupon tiles always
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
d257ce0
...
...
@@ -1078,18 +1078,20 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
// }
if
(
section
==
0
)
{
let
sumRedeemed
=
totalCouponValue
+
totalCouponDiscount
+
unifiedCouponsDiscount
if
(
self
.
dfyCoupons
.
count
>
0
||
self
.
unifiedCoupons
.
count
>
0
||
self
.
coupons
.
count
>
0
||
sumRedeemed
>
0.0
)
{
// TODO: Uncomment if we want to hide empty tiles again
// let sumRedeemed = totalCouponValue + totalCouponDiscount + unifiedCouponsDiscount
// if (self.dfyCoupons.count > 0 || self.unifiedCoupons.count > 0 || self.coupons.count > 0 || sumRedeemed > 0.0) {
return
1
}
else
{
return
0
}
//
} else {
//
return 0
//
}
}
else
if
(
section
==
1
)
{
if
(
self
.
showEmptyView
==
true
)
{
return
1
}
else
{
// TODO: Uncomment if we want to show emptyView again
// if (self.showEmptyView == true) {
// return 1
// } else {
return
0
}
//
}
}
else
if
(
section
==
2
)
{
return
1
}
...
...
@@ -1150,18 +1152,20 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
// }
if
(
indexPath
.
section
==
0
)
{
let
sumRedeemed
=
totalCouponValue
+
totalCouponDiscount
+
unifiedCouponsDiscount
if
(
self
.
dfyCoupons
.
count
>
0
||
self
.
unifiedCoupons
.
count
>
0
||
self
.
coupons
.
count
>
0
||
sumRedeemed
>
0.0
)
{
// TODO: Uncomment if we want to hide empty tiles again
// let sumRedeemed = totalCouponValue + totalCouponDiscount + unifiedCouponsDiscount
// if (self.dfyCoupons.count > 0 || self.unifiedCoupons.count > 0 || self.coupons.count > 0 || sumRedeemed > 0.0) {
return
UITableView
.
automaticDimension
}
else
{
return
0.0
}
//
} else {
//
return 0.0
//
}
}
else
if
(
indexPath
.
section
==
1
)
{
if
(
self
.
showEmptyView
==
true
)
{
return
UITableView
.
automaticDimension
}
else
{
// TODO: Uncomment if we want to show emptyView again
// if (self.showEmptyView == true) {
// return UITableView.automaticDimension
// } else {
return
0.0
}
//
}
}
else
if
(
indexPath
.
section
==
2
)
{
return
UITableView
.
automaticDimension
}
...
...
Please
register
or
login
to post a comment