Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_android_sdk_maven_plugin
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Panagiotis Triantafyllou
2022-03-23 11:30:44 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
21ed653bfe83fc2fc003838d2402789458a94306
21ed653b
1 parent
56e13269
open campaign
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/LoyaltyFragment.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/ProfileCampaignAdapter.java
warply_android_sdk/src/main/java/ly/warp/sdk/fragments/LoyaltyFragment.java
View file @
21ed653
...
...
@@ -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
->
{
})
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/adapters/ProfileCampaignAdapter.java
View file @
21ed653
...
...
@@ -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
());
...
...
Please
register
or
login
to post a comment