Panagiotis Triantafyllou

minor fix

......@@ -342,6 +342,9 @@ public class ContextualActivity extends Activity implements View.OnClickListener
@Override
public void onSuccess(JSONObject result) {
/* New Addition start */
if (mLoyalty != null) {
WarplyManagerHelper.removeCampaignItem(mLoyalty);
}
WarplyManager.getUserCouponsWithCouponsetsInternal(mUserCouponsReceiver);
WarplyManager.getCampaignsInternal(mCampaignsCallback);
/* New Addition end */
......@@ -385,14 +388,8 @@ public class ContextualActivity extends Activity implements View.OnClickListener
private CallbackReceiver<ArrayList<Campaign>> mCampaignsCallback = new CallbackReceiver<ArrayList<Campaign>>() {
@Override
public void onSuccess(ArrayList<Campaign> result) {
if (mLoyalty != null) {
WarplyManagerHelper.removeCampaignItem(mLoyalty);
OneTimeWorkRequest mywork = new OneTimeWorkRequest.Builder(EventCampaignService.class).build();
WorkManager.getInstance(ContextualActivity.this).enqueue(mywork);
} else {
OneTimeWorkRequest mywork = new OneTimeWorkRequest.Builder(EventCampaignService.class).build();
WorkManager.getInstance(ContextualActivity.this).enqueue(mywork);
}
OneTimeWorkRequest mywork = new OneTimeWorkRequest.Builder(EventCampaignService.class).build();
WorkManager.getInstance(ContextualActivity.this).enqueue(mywork);
}
@Override
......