Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2023-07-25 19:07:05 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
416b404407f3d92463f07b2096f97ea6b52d9734
416b4044
1 parent
928d5f7f
feedback fixes
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
8 deletions
warply_android_sdk/build.gradle
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyMarketAnalysisActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
warply_android_sdk/build.gradle
View file @
416b404
...
...
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext
{
PUBLISH_GROUP_ID
=
'ly.warp'
PUBLISH_VERSION
=
'4.5.4.6rc7
1
'
PUBLISH_VERSION
=
'4.5.4.6rc7
2
'
PUBLISH_ARTIFACT_ID
=
'warply-android-sdk'
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyMarketAnalysisActivity.java
View file @
416b404
...
...
@@ -90,12 +90,26 @@ public class LoyaltyMarketAnalysisActivity extends Activity implements View.OnCl
if
(
WarplyManagerHelper
.
getMarketCoupons
()
!=
null
&&
WarplyManagerHelper
.
getMarketCoupons
().
size
()
>
0
)
{
final
ExecutorService
executor
=
Executors
.
newFixedThreadPool
(
1
);
executor
.
submit
(()
->
{
for
(
UnifiedCoupon
unicoupon
:
WarplyManagerHelper
.
getMarketCoupons
())
{
if
(
unicoupon
.
getCoupons
()
!=
null
&&
unicoupon
.
getCoupons
().
size
()
>
0
)
{
for
(
Coupon
inncoupon
:
unicoupon
.
getCoupons
())
{
if
(
inncoupon
.
getStatus
()
==
0
)
{
countValue
+=
Float
.
valueOf
(
inncoupon
.
getDiscount
());
mExpiredMarketCoupons
.
add
(
inncoupon
);
// for (UnifiedCoupon unicoupon : WarplyManagerHelper.getMarketCoupons()) {
// if (unicoupon.getCoupons() != null && unicoupon.getCoupons().size() > 0) {
// for (Coupon inncoupon : unicoupon.getCoupons()) {
// if (inncoupon.getStatus() == 0) {
// countValue += Float.valueOf(inncoupon.getDiscount());
// mExpiredMarketCoupons.add(inncoupon);
// }
// }
// }
// }
if
(
WarplyManagerHelper
.
getCouponRedeemedList
().
size
()
>
0
)
{
if
(
WarplyManagerHelper
.
getCouponsetsDeals
().
size
()
>
0
)
{
for
(
Couponset
couset
:
WarplyManagerHelper
.
getCouponsetsDeals
())
{
for
(
Coupon
cou
:
WarplyManagerHelper
.
getCouponRedeemedList
())
{
if
(
cou
.
getCouponsetUuid
().
equals
(
couset
.
getUuid
()))
{
countValue
+=
Float
.
valueOf
(
cou
.
getDiscount
());
mExpiredMarketCoupons
.
add
(
cou
);
break
;
}
}
}
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
View file @
416b404
...
...
@@ -529,7 +529,7 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
}
// Third Expandable Banner
if
(
WarplyManagerHelper
.
getMarketCoupons
().
size
()
>
0
)
{
if
(
WarplyManagerHelper
.
getMarketCoupons
()
!=
null
&&
WarplyManagerHelper
.
getMarketCoupons
()
.
size
()
>
0
)
{
countValue
=
0.0f
;
// for (UnifiedCoupon unicou : WarplyManagerHelper.getMarketCoupons()) {
// if (unicou.getCoupons() != null && unicou.getCoupons().size() > 0) {
...
...
@@ -547,6 +547,13 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
for
(
Coupon
cou
:
WarplyManagerHelper
.
getCouponRedeemedList
())
{
if
(
cou
.
getCouponsetUuid
().
equals
(
couset
.
getUuid
()))
{
countValue
+=
Float
.
valueOf
(
cou
.
getDiscount
());
cou
.
setDescription
(
couset
.
getShortDescription
());
cou
.
setImage
(
couset
.
getImgPreview
());
cou
.
setName
(
couset
.
getName
());
cou
.
setMerchantUuid
(
couset
.
getMerchantUuid
());
cou
.
setInnerText
(
couset
.
getInnerText
());
cou
.
setDiscount_type
(
couset
.
getDiscount_type
());
cou
.
setFinal_price
(
couset
.
getFinal_price
());
break
;
}
}
...
...
Please
register
or
login
to post a comment