Showing
1 changed file
with
3 additions
and
6 deletions
... | @@ -342,6 +342,9 @@ public class ContextualActivity extends Activity implements View.OnClickListener | ... | @@ -342,6 +342,9 @@ public class ContextualActivity extends Activity implements View.OnClickListener |
342 | @Override | 342 | @Override |
343 | public void onSuccess(JSONObject result) { | 343 | public void onSuccess(JSONObject result) { |
344 | /* New Addition start */ | 344 | /* New Addition start */ |
345 | + if (mLoyalty != null) { | ||
346 | + WarplyManagerHelper.removeCampaignItem(mLoyalty); | ||
347 | + } | ||
345 | WarplyManager.getUserCouponsWithCouponsetsInternal(mUserCouponsReceiver); | 348 | WarplyManager.getUserCouponsWithCouponsetsInternal(mUserCouponsReceiver); |
346 | WarplyManager.getCampaignsInternal(mCampaignsCallback); | 349 | WarplyManager.getCampaignsInternal(mCampaignsCallback); |
347 | /* New Addition end */ | 350 | /* New Addition end */ |
... | @@ -385,14 +388,8 @@ public class ContextualActivity extends Activity implements View.OnClickListener | ... | @@ -385,14 +388,8 @@ public class ContextualActivity extends Activity implements View.OnClickListener |
385 | private CallbackReceiver<ArrayList<Campaign>> mCampaignsCallback = new CallbackReceiver<ArrayList<Campaign>>() { | 388 | private CallbackReceiver<ArrayList<Campaign>> mCampaignsCallback = new CallbackReceiver<ArrayList<Campaign>>() { |
386 | @Override | 389 | @Override |
387 | public void onSuccess(ArrayList<Campaign> result) { | 390 | public void onSuccess(ArrayList<Campaign> result) { |
388 | - if (mLoyalty != null) { | ||
389 | - WarplyManagerHelper.removeCampaignItem(mLoyalty); | ||
390 | OneTimeWorkRequest mywork = new OneTimeWorkRequest.Builder(EventCampaignService.class).build(); | 391 | OneTimeWorkRequest mywork = new OneTimeWorkRequest.Builder(EventCampaignService.class).build(); |
391 | WorkManager.getInstance(ContextualActivity.this).enqueue(mywork); | 392 | WorkManager.getInstance(ContextualActivity.this).enqueue(mywork); |
392 | - } else { | ||
393 | - OneTimeWorkRequest mywork = new OneTimeWorkRequest.Builder(EventCampaignService.class).build(); | ||
394 | - WorkManager.getInstance(ContextualActivity.this).enqueue(mywork); | ||
395 | - } | ||
396 | } | 393 | } |
397 | 394 | ||
398 | @Override | 395 | @Override | ... | ... |
-
Please register or login to post a comment