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
2024-02-27 16:57:44 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e28224d89b77321a5420626c48e859b3c6827645
e28224d8
1 parent
7cae7dbf
added event for the client to open the myrewards fragment from supermarket deals campaign
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
0 deletions
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/OpenMyRewardsEventModel.java
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyEventBusManager.java
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
warply_android_sdk/src/main/java/ly/warp/sdk/io/models/OpenMyRewardsEventModel.java
0 → 100644
View file @
e28224d
/*
* Copyright 2010-2013 Warply Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE WARPLY LTD ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL WARPLY LTD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package
ly
.
warp
.
sdk
.
io
.
models
;
/**
* Created by Panagiotis Triantafyllou on 27-Feb-24.
*/
public
class
OpenMyRewardsEventModel
{
private
boolean
open
;
public
OpenMyRewardsEventModel
()
{
this
.
open
=
true
;
}
public
boolean
isOpen
()
{
return
open
;
}
public
void
setOpen
(
boolean
open
)
{
this
.
open
=
open
;
}
}
warply_android_sdk/src/main/java/ly/warp/sdk/utils/managers/WarplyEventBusManager.java
View file @
e28224d
...
...
@@ -13,6 +13,7 @@ import ly.warp.sdk.io.models.LoyaltyGiftsForYouOfferClickEvent;
import
ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel
;
import
ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel
;
import
ly.warp.sdk.io.models.LoyaltySDKSessionExpiredEventModel
;
import
ly.warp.sdk.io.models.OpenMyRewardsEventModel
;
import
ly.warp.sdk.io.models.QuestionnaireEventModel
;
import
ly.warp.sdk.io.models.RefreshUnifiedCouponsEventModel
;
import
ly.warp.sdk.io.models.RefreshVouchersEventModel
;
...
...
@@ -45,6 +46,7 @@ public class WarplyEventBusManager {
private
WarplyCCMSEnabledModel
ccmsActivated
;
private
LoyaltyGiftsForYouOfferClickEvent
giftsYou
;
private
QuestionnaireEventModel
questionnaire
;
private
OpenMyRewardsEventModel
openRewards
;
private
VouchersActivityEventModel
vouchersActivity
;
private
VouchersFetchedEventModel
vouchersFetched
;
private
CouponEventModel
coupon
;
...
...
@@ -81,6 +83,10 @@ public class WarplyEventBusManager {
this
.
questionnaire
=
questionnaire
;
}
public
WarplyEventBusManager
(
OpenMyRewardsEventModel
openRewards
)
{
this
.
openRewards
=
openRewards
;
}
public
WarplyEventBusManager
(
RefreshVouchersEventModel
vouchersRefreshed
)
{
this
.
vouchersRefreshed
=
vouchersRefreshed
;
}
...
...
@@ -318,4 +324,8 @@ public class WarplyEventBusManager {
public
RefreshVouchersEventModel
getRefreshVouchersEventModel
()
{
return
vouchersRefreshed
;
}
public
OpenMyRewardsEventModel
getOpenMyRewardsEventModel
()
{
return
openRewards
;
}
}
...
...
warply_android_sdk/src/main/java/ly/warp/sdk/views/WarpView.java
View file @
e28224d
...
...
@@ -88,6 +88,7 @@ import ly.warp.sdk.db.WarplyDBHelper;
import
ly.warp.sdk.io.models.CouponEventModel
;
import
ly.warp.sdk.io.models.LoyaltySDKDynatraceEventModel
;
import
ly.warp.sdk.io.models.LoyaltySDKFirebaseEventModel
;
import
ly.warp.sdk.io.models.OpenMyRewardsEventModel
;
import
ly.warp.sdk.io.models.QuestionnaireEventModel
;
import
ly.warp.sdk.io.models.RefreshUnifiedCouponsEventModel
;
import
ly.warp.sdk.io.models.RefreshVouchersEventModel
;
...
...
@@ -495,6 +496,10 @@ public class WarpView extends WebView implements DefaultLifecycleObserver {
// Intent intent = new Intent((WarpActivity != null && !WarpActivity.isFinishing()) ? WarpActivity : getContext(), LoyaltyWallet.class);
// getContext().startActivity(intent);
OpenMyRewardsEventModel
openMyRewards
=
new
OpenMyRewardsEventModel
();
openMyRewards
.
setOpen
(
true
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
openMyRewards
));
RefreshVouchersEventModel
vouchersRefreshed
=
new
RefreshVouchersEventModel
();
vouchersRefreshed
.
setRefreshed
(
true
);
EventBus
.
getDefault
().
post
(
new
WarplyEventBusManager
(
vouchersRefreshed
));
...
...
Please
register
or
login
to post a comment