Panagiotis Triantafyllou

minor fix, new sdk version for maven

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.4-cosbeta5' 5 + PUBLISH_VERSION = '4.5.4-cosbeta6'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -13,6 +13,8 @@ import androidx.constraintlayout.widget.ConstraintLayout; ...@@ -13,6 +13,8 @@ import androidx.constraintlayout.widget.ConstraintLayout;
13 import ly.warp.sdk.R; 13 import ly.warp.sdk.R;
14 import ly.warp.sdk.io.models.Campaign; 14 import ly.warp.sdk.io.models.Campaign;
15 import ly.warp.sdk.io.models.CampaignList; 15 import ly.warp.sdk.io.models.CampaignList;
16 +import ly.warp.sdk.io.models.Coupon;
17 +import ly.warp.sdk.io.models.CouponList;
16 import ly.warp.sdk.utils.WarplyManagerHelper; 18 import ly.warp.sdk.utils.WarplyManagerHelper;
17 19
18 20
...@@ -116,6 +118,12 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { ...@@ -116,6 +118,12 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
116 // =========================================================== 118 // ===========================================================
117 119
118 private void initViews() { 120 private void initViews() {
121 + CouponList cpnlist = new CouponList();
122 + for (Coupon cpn : WarplyManagerHelper.getCouponList()) {
123 + if (cpn.getStatus() == 1)
124 + cpnlist.add(cpn);
125 + }
126 +
119 if (WarplyManagerHelper.getConsumer() != null) { 127 if (WarplyManagerHelper.getConsumer() != null) {
120 mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name), 128 mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name),
121 WarplyManagerHelper.getConsumer().getFirstName(), WarplyManagerHelper.getConsumer().getLastName())); 129 WarplyManagerHelper.getConsumer().getFirstName(), WarplyManagerHelper.getConsumer().getLastName()));
...@@ -135,10 +143,10 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener { ...@@ -135,10 +143,10 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
135 mIvBack.setOnClickListener(this); 143 mIvBack.setOnClickListener(this);
136 // mTvAnalysisButton.setOnClickListener(this); 144 // mTvAnalysisButton.setOnClickListener(this);
137 mLlQuestionnaire.setOnClickListener(this); 145 mLlQuestionnaire.setOnClickListener(this);
138 - mTvActiveCoupons.setText(String.format(getResources().getString(R.string.cos_active_coupons), String.valueOf(WarplyManagerHelper.getCouponList().size()))); 146 + mTvActiveCoupons.setText(String.format(getResources().getString(R.string.cos_active_coupons), String.valueOf(cpnlist)));
139 mClActiveCoupons.setOnClickListener(this); 147 mClActiveCoupons.setOnClickListener(this);
140 //TODO: change the parameter, for testing purposes only 148 //TODO: change the parameter, for testing purposes only
141 - mTvActiveRewards.setText(String.format(getResources().getString(R.string.cos_active_rewards), String.valueOf(WarplyManagerHelper.getCouponList().size()))); 149 + mTvActiveRewards.setText(String.format(getResources().getString(R.string.cos_active_rewards), String.valueOf(cpnlist)));
142 mClActiveRewards.setOnClickListener(this); 150 mClActiveRewards.setOnClickListener(this);
143 mLlAnalysisButton.setOnClickListener(this); 151 mLlAnalysisButton.setOnClickListener(this);
144 mLlPastCoupons.setOnClickListener(this); 152 mLlPastCoupons.setOnClickListener(this);
......