Panagiotis Triantafyllou

open campaign

......@@ -14,6 +14,7 @@ import androidx.recyclerview.widget.RecyclerView;
import org.json.JSONException;
import ly.warp.sdk.R;
import ly.warp.sdk.activities.WarpViewActivity;
import ly.warp.sdk.io.models.Campaign;
import ly.warp.sdk.io.models.CampaignList;
import ly.warp.sdk.views.adapters.ProfileCampaignAdapter;
......@@ -67,8 +68,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
mAdapterDeals = new ProfileCampaignAdapter(getContext(), clist);
mRecyclerDeals.setAdapter(mAdapterDeals);
mAdapterDeals.getPositionClicks()
.doOnNext(campaign -> {
.doOnNext(deal -> {
getContext().startActivity(
WarpViewActivity.createIntentFromSessionUUID(getContext(),
deal.getSessionUUID()));
})
.doOnError(error -> {
})
......@@ -79,8 +82,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
mAdapterGifts = new ProfileCampaignAdapter(getContext(), clist);
mRecyclerGifts.setAdapter(mAdapterGifts);
mAdapterGifts.getPositionClicks()
.doOnNext(campaign -> {
.doOnNext(gift -> {
getContext().startActivity(
WarpViewActivity.createIntentFromSessionUUID(getContext(),
gift.getSessionUUID()));
})
.doOnError(error -> {
})
......@@ -91,8 +96,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener {
mAdapterMore = new ProfileCampaignAdapter(getContext(), clist);
mRecyclerMore.setAdapter(mAdapterMore);
mAdapterMore.getPositionClicks()
.doOnNext(campaign -> {
.doOnNext(more -> {
getContext().startActivity(
WarpViewActivity.createIntentFromSessionUUID(getContext(),
more.getSessionUUID()));
})
.doOnError(error -> {
})
......
......@@ -79,14 +79,14 @@ public class ProfileCampaignAdapter extends RecyclerView.Adapter<ProfileCampaign
// RequestOptions
// .placeholderOf(R.drawable.ic_default_contact_photo)
// .error(R.drawable.ic_default_contact_photo))
.load(/*campaignItem.getLogoUrl()*/ R.drawable.ic_cosmote_logo_horizontal_grey)
.load(campaignItem.getLogoUrl())
.diskCacheStrategy(DiskCacheStrategy.DATA)
.into(holder.ivCampaignTitle);
} /*else {
} else {
Glide.with(mContext)
.load(R.drawable.ic_default_contact_photo)
.load(R.drawable.ic_cosmote_logo_horizontal_grey)
.into(holder.ivCampaignTitle);
}*/
}
holder.tvCampaignTitle.setText(campaignItem.getTitle());
......