Panagiotis Triantafyllou

sm deals fixes

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4.6rc78'
PUBLISH_VERSION = '4.5.4.6rc79'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -46,7 +46,6 @@ import io.github.inflationx.calligraphy3.CalligraphyTypefaceSpan;
import io.github.inflationx.calligraphy3.TypefaceUtils;
import io.github.inflationx.viewpump.ViewPumpContextWrapper;
import ly.warp.sdk.R;
import ly.warp.sdk.io.callbacks.CallbackReceiver;
import ly.warp.sdk.io.models.ActiveDFYCouponEventModel;
import ly.warp.sdk.io.models.ActiveDFYCouponModel;
import ly.warp.sdk.io.models.Coupon;
......@@ -59,7 +58,6 @@ import ly.warp.sdk.utils.WarpUtils;
import ly.warp.sdk.utils.WarplyManagerHelper;
import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
import ly.warp.sdk.utils.managers.WarplyEventBusManager;
import ly.warp.sdk.utils.managers.WarplyManager;
import ly.warp.sdk.views.adapters.ActiveCouponAdapter;
import ly.warp.sdk.views.adapters.MarketCouponAdapter;
......@@ -170,25 +168,25 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
mRecyclerCoupons.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
initViews();
// WarplyManager.getUnifiedCoupons(mUnifiedCallback);
}
@Override
protected void onStart() {
super.onStart();
if (!EventBus.getDefault().isRegistered(this))
EventBus.getDefault().register(this);
}
@Override
protected void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
// EventBus.getDefault().unregister(this);
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Override
......@@ -816,19 +814,6 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener, Vie
}
}
private final CallbackReceiver<ArrayList<UnifiedCoupon>> mUnifiedCallback = new CallbackReceiver<ArrayList<UnifiedCoupon>>() {
@Override
public void onSuccess(ArrayList<UnifiedCoupon> result) {
mUnifiedCoupons = result;
initViews();
}
@Override
public void onFailure(int errorCode) {
initViews();
}
};
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
......
......@@ -341,9 +341,9 @@ public class UnifiedCouponInfoActivity extends Activity implements View.OnClickL
.setTitle(R.string.cos_dlg_cancel_unified_coupon_success_title)
.setMessage(R.string.cos_dlg_cancel_unified_coupon_success_subtitle)
.setPositiveButton(R.string.cos_dlg_positive_button2, (dialogPositive, whichPositive) -> {
dialogPositive.dismiss();
RefreshUnifiedCouponsEventModel couponsRefreshed = new RefreshUnifiedCouponsEventModel();
EventBus.getDefault().post(new WarplyEventBusManager(couponsRefreshed));
dialogPositive.dismiss();
onBackPressed();
})
.setCancelable(false)
......
......@@ -2148,11 +2148,10 @@ public class WarplyManager {
if (tempUni.getStatus().trim().equals("active"))
couponList.add(tempUni);
}
}
WarplyManagerHelper.setMarketCoupons(allCouponList);
WarplyManagerHelper.setMarketCouponsList(couponList);
}
}
} catch (Exception e) {
e.printStackTrace();
}
......