Panagiotis Triantafyllou

my rewards ui fixes, added activity param in box history event

...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ...@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2 2
3 ext { 3 ext {
4 PUBLISH_GROUP_ID = 'ly.warp' 4 PUBLISH_GROUP_ID = 'ly.warp'
5 - PUBLISH_VERSION = '4.5.5.4r27' 5 + PUBLISH_VERSION = '4.5.5.4r28'
6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk' 6 PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
7 } 7 }
8 8
......
...@@ -202,6 +202,7 @@ public class LoyaltyHistoryActivity extends Activity implements View.OnClickList ...@@ -202,6 +202,7 @@ public class LoyaltyHistoryActivity extends Activity implements View.OnClickList
202 202
203 WarplyBoxAnalysisEventModel warplyBoxAnalysisEventModel = new WarplyBoxAnalysisEventModel(); 203 WarplyBoxAnalysisEventModel warplyBoxAnalysisEventModel = new WarplyBoxAnalysisEventModel();
204 warplyBoxAnalysisEventModel.setPressed(true); 204 warplyBoxAnalysisEventModel.setPressed(true);
205 + warplyBoxAnalysisEventModel.setActivity(LoyaltyHistoryActivity.this);
205 EventBus.getDefault().post(new WarplyEventBusManager(warplyBoxAnalysisEventModel)); 206 EventBus.getDefault().post(new WarplyEventBusManager(warplyBoxAnalysisEventModel));
206 207
207 LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel(); 208 LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
......
...@@ -770,13 +770,13 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener ...@@ -770,13 +770,13 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
770 /** Hide all and show empty view */ 770 /** Hide all and show empty view */
771 mLlVouchers.setVisibility(View.GONE); 771 mLlVouchers.setVisibility(View.GONE);
772 // mLlVouchersSpinner.setVisibility(View.GONE); 772 // mLlVouchersSpinner.setVisibility(View.GONE);
773 - if (!TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) && WarplyManagerHelper.getShowVouchersBanner().equals("null")) 773 +// if (!TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) && WarplyManagerHelper.getShowVouchersBanner().equals("null"))
774 - mLlEmptyWallet.setVisibility(View.VISIBLE); 774 +// mLlEmptyWallet.setVisibility(View.VISIBLE);
775 } else { 775 } else {
776 /** Show loyalty banners and hide empty view 776 /** Show loyalty banners and hide empty view
777 * Show spinner only if empty */ 777 * Show spinner only if empty */
778 mLlEmptyWallet.setVisibility(View.GONE); 778 mLlEmptyWallet.setVisibility(View.GONE);
779 - mLlBannerInfo.setVisibility(View.VISIBLE); 779 +// mLlBannerInfo.setVisibility(View.VISIBLE);
780 } 780 }
781 } else { 781 } else {
782 if (WarplyManagerHelper.getShowVouchersBanner().equals("true")) { 782 if (WarplyManagerHelper.getShowVouchersBanner().equals("true")) {
...@@ -799,10 +799,10 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener ...@@ -799,10 +799,10 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
799 && (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0) 799 && (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)
800 && checkHistoryEmpty()) { 800 && checkHistoryEmpty()) {
801 /** Hide loyalty banners and hide separator */ 801 /** Hide loyalty banners and hide separator */
802 - mLlBannerInfo.setVisibility(View.GONE); 802 +// mLlBannerInfo.setVisibility(View.GONE);
803 } else { 803 } else {
804 /** Show loyalty banners and show separator */ 804 /** Show loyalty banners and show separator */
805 - mLlBannerInfo.setVisibility(View.VISIBLE); 805 +// mLlBannerInfo.setVisibility(View.VISIBLE);
806 } 806 }
807 } else if (WarplyManagerHelper.getShowVouchersBanner().equals("false")) { 807 } else if (WarplyManagerHelper.getShowVouchersBanner().equals("false")) {
808 /** Hide spinner and hide vouchers and hide empty view and show disabled vouchers and show disabled separator */ 808 /** Hide spinner and hide vouchers and hide empty view and show disabled vouchers and show disabled separator */
...@@ -824,11 +824,11 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener ...@@ -824,11 +824,11 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
824 && (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0) 824 && (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)
825 && checkHistoryEmpty()) { 825 && checkHistoryEmpty()) {
826 /** Hide loyalty banners and hide empty view and hide disabled separator */ 826 /** Hide loyalty banners and hide empty view and hide disabled separator */
827 - mLlBannerInfo.setVisibility(View.GONE); 827 +// mLlBannerInfo.setVisibility(View.GONE);
828 mLlEmptyWallet.setVisibility(View.GONE); 828 mLlEmptyWallet.setVisibility(View.GONE);
829 } else { 829 } else {
830 /** Show loyalty banners and show disabled separator */ 830 /** Show loyalty banners and show disabled separator */
831 - mLlBannerInfo.setVisibility(View.VISIBLE); 831 +// mLlBannerInfo.setVisibility(View.VISIBLE);
832 } 832 }
833 } 833 }
834 } 834 }
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
25 25
26 package ly.warp.sdk.io.models; 26 package ly.warp.sdk.io.models;
27 27
28 +import android.app.Activity;
29 +
28 /** 30 /**
29 * Created by Panagiotis Triantafyllou on 01-May-24. 31 * Created by Panagiotis Triantafyllou on 01-May-24.
30 */ 32 */
...@@ -32,6 +34,7 @@ package ly.warp.sdk.io.models; ...@@ -32,6 +34,7 @@ package ly.warp.sdk.io.models;
32 public class WarplyBoxAnalysisEventModel { 34 public class WarplyBoxAnalysisEventModel {
33 35
34 private boolean isPressed = false; 36 private boolean isPressed = false;
37 + private Activity mActivity;
35 38
36 39
37 public WarplyBoxAnalysisEventModel() { 40 public WarplyBoxAnalysisEventModel() {
...@@ -45,4 +48,12 @@ public class WarplyBoxAnalysisEventModel { ...@@ -45,4 +48,12 @@ public class WarplyBoxAnalysisEventModel {
45 public void setPressed(boolean pressed) { 48 public void setPressed(boolean pressed) {
46 isPressed = pressed; 49 isPressed = pressed;
47 } 50 }
51 +
52 + public Activity getActivity() {
53 + return mActivity;
54 + }
55 +
56 + public void setActivity(Activity mActivity) {
57 + this.mActivity = mActivity;
58 + }
48 } 59 }
......
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
18 android:layout_height="wrap_content" 18 android:layout_height="wrap_content"
19 android:layout_marginHorizontal="14dp" 19 android:layout_marginHorizontal="14dp"
20 android:layout_marginTop="16dp" 20 android:layout_marginTop="16dp"
21 - android:orientation="vertical" 21 + android:orientation="vertical">
22 - android:visibility="gone"
23 - tools:visibility="visible">
24 22
25 <LinearLayout 23 <LinearLayout
26 android:layout_width="match_parent" 24 android:layout_width="match_parent"
......