Panagiotis Triantafyllou

minor fix, new sdk version for maven

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4-cosbeta5'
PUBLISH_VERSION = '4.5.4-cosbeta6'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -13,6 +13,8 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import ly.warp.sdk.R;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
import ly.warp.sdk.io.models.Coupon;
import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.utils.WarplyManagerHelper;
......@@ -116,6 +118,12 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
// ===========================================================
private void initViews() {
CouponList cpnlist = new CouponList();
for (Coupon cpn : WarplyManagerHelper.getCouponList()) {
if (cpn.getStatus() == 1)
cpnlist.add(cpn);
}
if (WarplyManagerHelper.getConsumer() != null) {
mTvUsername.setText(String.format(getResources().getString(R.string.cos_profile_loyalty_name),
WarplyManagerHelper.getConsumer().getFirstName(), WarplyManagerHelper.getConsumer().getLastName()));
......@@ -135,10 +143,10 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
mIvBack.setOnClickListener(this);
// mTvAnalysisButton.setOnClickListener(this);
mLlQuestionnaire.setOnClickListener(this);
mTvActiveCoupons.setText(String.format(getResources().getString(R.string.cos_active_coupons), String.valueOf(WarplyManagerHelper.getCouponList().size())));
mTvActiveCoupons.setText(String.format(getResources().getString(R.string.cos_active_coupons), String.valueOf(cpnlist)));
mClActiveCoupons.setOnClickListener(this);
//TODO: change the parameter, for testing purposes only
mTvActiveRewards.setText(String.format(getResources().getString(R.string.cos_active_rewards), String.valueOf(WarplyManagerHelper.getCouponList().size())));
mTvActiveRewards.setText(String.format(getResources().getString(R.string.cos_active_rewards), String.valueOf(cpnlist)));
mClActiveRewards.setOnClickListener(this);
mLlAnalysisButton.setOnClickListener(this);
mLlPastCoupons.setOnClickListener(this);
......