Showing
2 changed files
with
17 additions
and
10 deletions
| ... | @@ -14,6 +14,7 @@ import androidx.recyclerview.widget.RecyclerView; | ... | @@ -14,6 +14,7 @@ import androidx.recyclerview.widget.RecyclerView; |
| 14 | import org.json.JSONException; | 14 | import org.json.JSONException; |
| 15 | 15 | ||
| 16 | import ly.warp.sdk.R; | 16 | import ly.warp.sdk.R; |
| 17 | +import ly.warp.sdk.activities.WarpViewActivity; | ||
| 17 | import ly.warp.sdk.io.models.Campaign; | 18 | import ly.warp.sdk.io.models.Campaign; |
| 18 | import ly.warp.sdk.io.models.CampaignList; | 19 | import ly.warp.sdk.io.models.CampaignList; |
| 19 | import ly.warp.sdk.views.adapters.ProfileCampaignAdapter; | 20 | import ly.warp.sdk.views.adapters.ProfileCampaignAdapter; |
| ... | @@ -67,8 +68,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { | ... | @@ -67,8 +68,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { |
| 67 | mAdapterDeals = new ProfileCampaignAdapter(getContext(), clist); | 68 | mAdapterDeals = new ProfileCampaignAdapter(getContext(), clist); |
| 68 | mRecyclerDeals.setAdapter(mAdapterDeals); | 69 | mRecyclerDeals.setAdapter(mAdapterDeals); |
| 69 | mAdapterDeals.getPositionClicks() | 70 | mAdapterDeals.getPositionClicks() |
| 70 | - .doOnNext(campaign -> { | 71 | + .doOnNext(deal -> { |
| 71 | - | 72 | + getContext().startActivity( |
| 73 | + WarpViewActivity.createIntentFromSessionUUID(getContext(), | ||
| 74 | + deal.getSessionUUID())); | ||
| 72 | }) | 75 | }) |
| 73 | .doOnError(error -> { | 76 | .doOnError(error -> { |
| 74 | }) | 77 | }) |
| ... | @@ -79,8 +82,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { | ... | @@ -79,8 +82,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { |
| 79 | mAdapterGifts = new ProfileCampaignAdapter(getContext(), clist); | 82 | mAdapterGifts = new ProfileCampaignAdapter(getContext(), clist); |
| 80 | mRecyclerGifts.setAdapter(mAdapterGifts); | 83 | mRecyclerGifts.setAdapter(mAdapterGifts); |
| 81 | mAdapterGifts.getPositionClicks() | 84 | mAdapterGifts.getPositionClicks() |
| 82 | - .doOnNext(campaign -> { | 85 | + .doOnNext(gift -> { |
| 83 | - | 86 | + getContext().startActivity( |
| 87 | + WarpViewActivity.createIntentFromSessionUUID(getContext(), | ||
| 88 | + gift.getSessionUUID())); | ||
| 84 | }) | 89 | }) |
| 85 | .doOnError(error -> { | 90 | .doOnError(error -> { |
| 86 | }) | 91 | }) |
| ... | @@ -91,8 +96,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { | ... | @@ -91,8 +96,10 @@ public class LoyaltyFragment extends Fragment implements View.OnClickListener { |
| 91 | mAdapterMore = new ProfileCampaignAdapter(getContext(), clist); | 96 | mAdapterMore = new ProfileCampaignAdapter(getContext(), clist); |
| 92 | mRecyclerMore.setAdapter(mAdapterMore); | 97 | mRecyclerMore.setAdapter(mAdapterMore); |
| 93 | mAdapterMore.getPositionClicks() | 98 | mAdapterMore.getPositionClicks() |
| 94 | - .doOnNext(campaign -> { | 99 | + .doOnNext(more -> { |
| 95 | - | 100 | + getContext().startActivity( |
| 101 | + WarpViewActivity.createIntentFromSessionUUID(getContext(), | ||
| 102 | + more.getSessionUUID())); | ||
| 96 | }) | 103 | }) |
| 97 | .doOnError(error -> { | 104 | .doOnError(error -> { |
| 98 | }) | 105 | }) | ... | ... |
| ... | @@ -79,14 +79,14 @@ public class ProfileCampaignAdapter extends RecyclerView.Adapter<ProfileCampaign | ... | @@ -79,14 +79,14 @@ public class ProfileCampaignAdapter extends RecyclerView.Adapter<ProfileCampaign |
| 79 | // RequestOptions | 79 | // RequestOptions |
| 80 | // .placeholderOf(R.drawable.ic_default_contact_photo) | 80 | // .placeholderOf(R.drawable.ic_default_contact_photo) |
| 81 | // .error(R.drawable.ic_default_contact_photo)) | 81 | // .error(R.drawable.ic_default_contact_photo)) |
| 82 | - .load(/*campaignItem.getLogoUrl()*/ R.drawable.ic_cosmote_logo_horizontal_grey) | 82 | + .load(campaignItem.getLogoUrl()) |
| 83 | .diskCacheStrategy(DiskCacheStrategy.DATA) | 83 | .diskCacheStrategy(DiskCacheStrategy.DATA) |
| 84 | .into(holder.ivCampaignTitle); | 84 | .into(holder.ivCampaignTitle); |
| 85 | - } /*else { | 85 | + } else { |
| 86 | Glide.with(mContext) | 86 | Glide.with(mContext) |
| 87 | - .load(R.drawable.ic_default_contact_photo) | 87 | + .load(R.drawable.ic_cosmote_logo_horizontal_grey) |
| 88 | .into(holder.ivCampaignTitle); | 88 | .into(holder.ivCampaignTitle); |
| 89 | - }*/ | 89 | + } |
| 90 | 90 | ||
| 91 | holder.tvCampaignTitle.setText(campaignItem.getTitle()); | 91 | holder.tvCampaignTitle.setText(campaignItem.getTitle()); |
| 92 | 92 | ... | ... |
-
Please register or login to post a comment