Panagiotis Triantafyllou

sm deals fixes revert

......@@ -211,13 +211,13 @@ public class UnifiedCouponInfoActivity extends Activity implements View.OnClickL
// mTvActiveValue.setText(HtmlCompat.fromHtml(String.format(getString(R.string.cos_unified_subtitle), String.valueOf(activeValue)), HtmlCompat.FROM_HTML_MODE_COMPACT));
mTvActiveValue.setText(getString(R.string.cos_unified_subtitle2));
Collections.sort(cpnlist, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate()));
Collections.sort(cpnlist, (coupon1, coupon2) -> coupon2.getExpirationDate().compareTo(coupon1.getExpirationDate()));
for (Coupon tempItem : cpnlist) {
if (tempItem.getStatus() == 1) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm");
Date newDate = new Date();
try {
newDate = simpleDateFormat.parse(cpnlist.get(0).getExpiration());
newDate = simpleDateFormat.parse(tempItem.getExpiration());
} catch (ParseException e) {
e.printStackTrace();
}
......
......@@ -109,7 +109,7 @@ public class MarketCouponAdapter extends RecyclerView.Adapter<MarketCouponAdapte
}
}
Collections.sort(couponList, (coupon1, coupon2) -> coupon1.getExpirationDate().compareTo(coupon2.getExpirationDate()));
Collections.sort(couponList, (coupon1, coupon2) -> coupon2.getExpirationDate().compareTo(coupon1.getExpirationDate()));
if (couponList != null && couponList.size() > 0) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
......