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-09-14 18:32:33 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
22acba15a3637f86724b567c8ab1ad8e0f2627cd
22acba15
1 parent
1b42f05f
new keys
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
67 additions
and
65 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsActivity.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
warply_android_sdk/src/main/java/ly/warp/sdk/activities/GiftsForYouActivity.java
View file @
22acba1
...
...
@@ -96,9 +96,9 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
}
mergeDatasets
(
mValuesList
,
mSeasonalList
,
mContextualList
mContextualList
,
mValuesList
);
mIvBack
=
findViewById
(
R
.
id
.
iv_list_close
);
...
...
@@ -167,9 +167,9 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
}
mergeDatasets
(
mValuesList
,
mSeasonalList
,
mContextualList
mContextualList
,
mValuesList
);
runOnUiThread
(()
->
{
...
...
@@ -429,21 +429,10 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
}
}
private
void
mergeDatasets
(
ArrayList
<
Campaign
>
campaign
List
,
ArrayList
<
Loyalty
GiftsForYouPackage
>
seasonal
List
,
ArrayList
<
LoyaltyContextualOfferModel
>
ccms
List
)
{
private
void
mergeDatasets
(
ArrayList
<
LoyaltyGiftsForYouPackage
>
seasonal
List
,
ArrayList
<
Loyalty
ContextualOfferModel
>
ccms
List
,
ArrayList
<
Campaign
>
campaign
List
)
{
mData
.
clear
();
if
(
campaignList
!=
null
&&
campaignList
.
size
()
>
0
)
{
Log
.
v
(
"GIFTS_FOR_YOU"
,
String
.
valueOf
(
campaignList
.
size
()));
for
(
Campaign
campaign
:
campaignList
)
{
MergedGifts
data
=
new
MergedGifts
();
data
.
setCampaign
(
campaign
);
data
.
setSeasonalList
(
null
);
data
.
setDataType
(
1
);
mData
.
add
(
data
);
}
}
if
(
seasonalList
!=
null
&&
seasonalList
.
size
()
>
0
)
{
Log
.
v
(
"SEASONAL"
,
String
.
valueOf
(
seasonalList
.
size
()));
for
(
LoyaltyGiftsForYouPackage
seasonal
:
seasonalList
)
{
...
...
@@ -466,6 +455,17 @@ public class GiftsForYouActivity extends Activity implements View.OnClickListene
mData
.
add
(
data
);
}
}
if
(
campaignList
!=
null
&&
campaignList
.
size
()
>
0
)
{
Log
.
v
(
"GIFTS_FOR_YOU"
,
String
.
valueOf
(
campaignList
.
size
()));
for
(
Campaign
campaign
:
campaignList
)
{
MergedGifts
data
=
new
MergedGifts
();
data
.
setCampaign
(
campaign
);
data
.
setSeasonalList
(
null
);
data
.
setDataType
(
1
);
mData
.
add
(
data
);
}
}
}
private
void
filterItems
()
{
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/LoyaltyWallet.java
View file @
22acba1
...
...
@@ -103,43 +103,43 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
mLlEmptyWallet
=
findViewById
(
R
.
id
.
ll_empty_wallet
);
mLlActiveCodesView
=
findViewById
(
R
.
id
.
ll_active_deals_codes_view
);
ArrayList
<
ActiveDFYCouponModel
>
dlist
=
new
ArrayList
<>();
ActiveDFYCouponModel
model
=
new
ActiveDFYCouponModel
();
model
.
setCode
(
"123456789"
);
model
.
setValue
(
"10"
);
model
.
setDate
(
"2022-09-14 20:20"
);
dlist
.
add
(
model
);
model
=
new
ActiveDFYCouponModel
();
model
.
setCode
(
"123456780"
);
model
.
setValue
(
"10"
);
model
.
setDate
(
"2022-09-14 20:20"
);
dlist
.
add
(
model
);
model
=
new
ActiveDFYCouponModel
();
model
.
setCode
(
"123456781"
);
model
.
setValue
(
"10"
);
model
.
setDate
(
"2022-09-14 20:20"
);
dlist
.
add
(
model
);
model
=
new
ActiveDFYCouponModel
();
model
.
setCode
(
"123456782"
);
model
.
setValue
(
"10"
);
model
.
setDate
(
"2022-09-14 20:20"
);
dlist
.
add
(
model
);
model
=
new
ActiveDFYCouponModel
();
model
.
setCode
(
"123456783"
);
model
.
setValue
(
"10"
);
model
.
setDate
(
"2022-09-14 20:20"
);
dlist
.
add
(
model
);
model
=
new
ActiveDFYCouponModel
();
model
.
setCode
(
"123456784"
);
model
.
setValue
(
"10"
);
model
.
setDate
(
"2022-09-14 20:20"
);
dlist
.
add
(
model
);
model
=
new
ActiveDFYCouponModel
();
model
.
setCode
(
"123456785"
);
model
.
setValue
(
"10"
);
model
.
setDate
(
"2022-09-14 20:20"
);
dlist
.
add
(
model
);
WarplyManagerHelper
.
setActiveDFYCoupons
(
dlist
);
//
ArrayList<ActiveDFYCouponModel> dlist = new ArrayList<>();
//
ActiveDFYCouponModel model = new ActiveDFYCouponModel();
//
model.setCode("123456789");
//
model.setValue("10");
//
model.setDate("2022-09-14 20:20");
//
dlist.add(model);
//
model = new ActiveDFYCouponModel();
//
model.setCode("123456780");
//
model.setValue("10");
//
model.setDate("2022-09-14 20:20");
//
dlist.add(model);
//
model = new ActiveDFYCouponModel();
//
model.setCode("123456781");
//
model.setValue("10");
//
model.setDate("2022-09-14 20:20");
//
dlist.add(model);
//
model = new ActiveDFYCouponModel();
//
model.setCode("123456782");
//
model.setValue("10");
//
model.setDate("2022-09-14 20:20");
//
dlist.add(model);
//
model = new ActiveDFYCouponModel();
//
model.setCode("123456783");
//
model.setValue("10");
//
model.setDate("2022-09-14 20:20");
//
dlist.add(model);
//
model = new ActiveDFYCouponModel();
//
model.setCode("123456784");
//
model.setValue("10");
//
model.setDate("2022-09-14 20:20");
//
dlist.add(model);
//
model = new ActiveDFYCouponModel();
//
model.setCode("123456785");
//
model.setValue("10");
//
model.setDate("2022-09-14 20:20");
//
dlist.add(model);
//
WarplyManagerHelper.setActiveDFYCoupons(dlist);
if
(
WarplyManagerHelper
.
getActiveDFYCoupons
()
!=
null
)
{
Collections
.
sort
(
WarplyManagerHelper
.
getActiveDFYCoupons
(),
new
Comparator
<
ActiveDFYCouponModel
>()
{
...
...
@@ -402,7 +402,8 @@ public class LoyaltyWallet extends Activity implements View.OnClickListener {
mTvActiveTitle
.
setText
(
String
.
format
(
getString
(
R
.
string
.
cos_active_deals_plural
),
String
.
valueOf
(
WarplyManagerHelper
.
getActiveDFYCoupons
().
size
())));
mTvActiveCode
.
setVisibility
(
View
.
GONE
);
for
(
ActiveDFYCouponModel
dealsItem
:
WarplyManagerHelper
.
getActiveDFYCoupons
())
{
//TODO fix logic
for
(
ActiveDFYCouponModel
dealsItem
:
WarplyManagerHelper
.
getActiveDFYCoupons
().
subList
(
0
,
4
))
{
LayoutInflater
vi
=
(
LayoutInflater
)
getApplicationContext
().
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
LinearLayout
v
=
(
LinearLayout
)
vi
.
inflate
(
R
.
layout
.
item_selectable
,
null
);
TextView
textView
=
(
TextView
)
v
.
findViewById
(
R
.
id
.
tv_code_copy
);
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/activities/ShopsActivity.java
View file @
22acba1
...
...
@@ -203,7 +203,7 @@ public class ShopsActivity extends FragmentActivity implements View.OnClickListe
pinName
.
setText
(
merch
.
getName
());
TextView
pinDays
=
(
TextView
)
bottomSheetDialog
.
findViewById
(
R
.
id
.
tv_pin_days
);
pinDays
.
setText
(
merch
.
getSnippet
());
pinDays
.
setText
(
merch
.
getSnippet
());
//TODO: wrong getter
TextView
pinTel
=
(
TextView
)
bottomSheetDialog
.
findViewById
(
R
.
id
.
tv_pin_tel
);
pinTel
.
setText
(
merch
.
getTelephone
());
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/WarplyManagerHelper.java
View file @
22acba1
...
...
@@ -200,7 +200,10 @@ public class WarplyManagerHelper {
mAlertDialogSharing
=
new
AlertDialog
.
Builder
(
context
)
.
setTitle
(
R
.
string
.
cos_dlg_success_title
)
.
setMessage
(
alertTitle
)
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button
,
(
dialogPositive
,
whichPositive
)
->
{
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button
,
(
dialogPositive
,
whichPositive
)
->
{
rejectSharingDialog
(
context
,
sharingId
);
})
.
setPositiveButton
(
R
.
string
.
cos_dlg_positive_button
,
(
dialogNegative
,
whichNegative
)
->
{
WarplyManager
.
cosmoteRetrieveSharing
(
new
CosmoteRetrieveSharingRequest
()
.
setSharingId
(
sharingId
)
.
setAccept
(
true
),
...
...
@@ -233,9 +236,6 @@ public class WarplyManagerHelper {
}
});
})
.
setNegativeButton
(
R
.
string
.
cos_dlg_negative_button
,
(
dialogNegative
,
whichNegative
)
->
{
rejectSharingDialog
(
context
,
sharingId
);
})
.
show
();
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyManager.java
View file @
22acba1
This diff is collapsed. Click to expand it.
warply_android_sdk/src/main/res/layout/activity_loyalty_wallet.xml
View file @
22acba1
...
...
@@ -338,11 +338,12 @@
android:id=
"@+id/ll_active_deals_codes_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_maxHeight=
"60dp"
android:visibility=
"gone"
app:alignContent=
"flex_start"
app:alignItems=
"flex_start"
app:flexWrap=
"wrap"
></com.google.android.flexbox.FlexboxLayout>
app:flexDirection=
"row"
app:justifyContent=
"flex_start"
app:flexWrap=
"wrap"
>
</com.google.android.flexbox.FlexboxLayout>
<TextView
android:id=
"@+id/tv_active_deals_date_text"
...
...
Please
register
or
login
to post a comment