Panagiotis Triantafyllou

minor addition

......@@ -24,12 +24,14 @@ import java.util.ArrayList;
import ly.warp.sdk.R;
import ly.warp.sdk.activities.ActiveCouponsActivity;
import ly.warp.sdk.activities.BaseFragmentActivity;
import ly.warp.sdk.activities.TelematicsActivity;
import ly.warp.sdk.activities.TelematicsHistoryActivity;
import ly.warp.sdk.activities.WarpViewActivity;
import ly.warp.sdk.io.callbacks.CallbackReceiver;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CouponList;
import ly.warp.sdk.io.models.UnifiedCoupon;
import ly.warp.sdk.io.request.WarplyGetCampaignsRequest;
import ly.warp.sdk.utils.WarplyManagerHelper;
import ly.warp.sdk.utils.managers.WarplyManager;
......@@ -103,6 +105,7 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip
public void onRefresh() {
WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
WarplyManager.getCampaigns(mCampaignsCallback);
WarplyManager.getUnifiedCouponsDeals(mUnifiedCallback);
mSwipeRefresh.setRefreshing(false);
}
......@@ -159,6 +162,18 @@ public class HomeFragment extends Fragment implements View.OnClickListener, Swip
}
};
private final CallbackReceiver<ArrayList<UnifiedCoupon>> mUnifiedCallback = new CallbackReceiver<ArrayList<UnifiedCoupon>>() {
@Override
public void onSuccess(ArrayList<UnifiedCoupon> result) {
Toast.makeText(getActivity(), "Unified Coupons Success " + String.valueOf(result.size()), Toast.LENGTH_SHORT).show();
}
@Override
public void onFailure(int errorCode) {
Toast.makeText(getActivity(), "Unified Coupons Error", Toast.LENGTH_SHORT).show();
}
};
private final CallbackReceiver<JSONObject> mLogoutReceiver = new CallbackReceiver<JSONObject>() {
@Override
public void onSuccess(JSONObject result) {
......