Panagiotis Triantafyllou

added missing event

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.4.6rc34'
PUBLISH_VERSION = '4.5.4.6rc35'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -28,6 +28,7 @@ import ly.warp.sdk.io.callbacks.CallbackReceiver;
import ly.warp.sdk.io.models.Consumer;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest;
import ly.warp.sdk.io.request.WarplyConsumerRequest;
import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
......@@ -266,6 +267,10 @@ public class ContextualActivity extends Activity implements View.OnClickListener
analyticsEvent.setParameter("successful", "true");
EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel();
ccmsEnabled.setActivated(true);
EventBus.getDefault().post(new WarplyEventBusManager(ccmsEnabled));
if (!isFinishing()) {
mAlertDialogSuccessActivating = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_activate_success_title)
......
......@@ -34,6 +34,7 @@ import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.io.models.Couponset;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
import ly.warp.sdk.io.models.WarplyCouponsChangedEventModel;
import ly.warp.sdk.io.request.WarplyGetCampaignsRequest;
import ly.warp.sdk.io.request.WarplyRedeemCouponRequest;
......@@ -205,6 +206,12 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
mPbLoading.setVisibility(View.GONE);
int status = result.optInt("status");
if (status == 1) {
if (mCcms != null) {
WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel();
ccmsEnabled.setActivated(true);
EventBus.getDefault().post(new WarplyEventBusManager(ccmsEnabled));
}
mCoupon = new Coupon(result.optJSONObject("result"));
mCoupon.setDescription(mCouponset.getShortDescription());
mCoupon.setImage(mCouponset.getImgPreview());
......
......@@ -31,6 +31,7 @@ import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.Consumer;
import ly.warp.sdk.io.models.LoyaltyContextualOfferModel;
import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
import ly.warp.sdk.io.request.CosmoteSubmitOrderRequest;
import ly.warp.sdk.io.request.WarplyConsumerRequest;
import ly.warp.sdk.utils.managers.WarplyAnalyticsManager;
......@@ -300,6 +301,10 @@ public class TelcoActivity extends Activity implements View.OnClickListener {
analyticsEvent.setParameter("successful", "true");
EventBus.getDefault().post(new WarplyEventBusManager(analyticsEvent));
WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel();
ccmsEnabled.setActivated(true);
EventBus.getDefault().post(new WarplyEventBusManager(ccmsEnabled));
if (!isFinishing()) {
mAlertDialogSuccessActivating = new AlertDialog.Builder(this)
.setTitle(R.string.cos_dlg_activate_success_title)
......
......@@ -70,6 +70,7 @@ import ly.warp.sdk.db.WarplyDBHelper;
import ly.warp.sdk.io.models.CouponEventModel;
import ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel;
import ly.warp.sdk.io.models.QuestionnaireEventModel;
import ly.warp.sdk.io.models.WarplyCCMSEnabledModel;
import ly.warp.sdk.io.models.WarplyPacingCardEventModel;
import ly.warp.sdk.io.models.WarplyPacingEventModel;
import ly.warp.sdk.services.WarplyHealthService;
......@@ -421,8 +422,10 @@ public class WarpView extends WebView {
}
} else if (parts[1].equals("couponRetrieved")) {
EventBus.getDefault().post(new WarplyEventBusManager(new CouponEventModel()));
} else if (parts[1].equals("couponShared")) {
// EventBus.getDefault().post(new WarplyEventBusManager(new CouponEventModel()));
} else if (parts[1].equals("ccmsRetrieved")) {
WarplyCCMSEnabledModel ccmsEnabled = new WarplyCCMSEnabledModel();
ccmsEnabled.setActivated(true);
EventBus.getDefault().post(new WarplyEventBusManager(ccmsEnabled));
} else if (parts[1].equals("steps") && parts[2].equals("widgetDisabled")) { // This is for the pacing widget
WarplyPacingCardEventModel pacingWidgetVisible = new WarplyPacingCardEventModel();
pacingWidgetVisible.setVisible(false);
......