Panagiotis Triantafyllou

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

......@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.5.4r27'
PUBLISH_VERSION = '4.5.5.4r28'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......
......@@ -202,6 +202,7 @@ public class LoyaltyHistoryActivity extends Activity implements View.OnClickList
WarplyBoxAnalysisEventModel warplyBoxAnalysisEventModel = new WarplyBoxAnalysisEventModel();
warplyBoxAnalysisEventModel.setPressed(true);
warplyBoxAnalysisEventModel.setActivity(LoyaltyHistoryActivity.this);
EventBus.getDefault().post(new WarplyEventBusManager(warplyBoxAnalysisEventModel));
LoyaltySDKFirebaseEventModel analyticsEvent = new LoyaltySDKFirebaseEventModel();
......
......@@ -770,13 +770,13 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
/** Hide all and show empty view */
mLlVouchers.setVisibility(View.GONE);
// mLlVouchersSpinner.setVisibility(View.GONE);
if (!TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) && WarplyManagerHelper.getShowVouchersBanner().equals("null"))
mLlEmptyWallet.setVisibility(View.VISIBLE);
// if (!TextUtils.isEmpty(WarplyManagerHelper.getShowVouchersBanner()) && WarplyManagerHelper.getShowVouchersBanner().equals("null"))
// mLlEmptyWallet.setVisibility(View.VISIBLE);
} else {
/** Show loyalty banners and hide empty view
* Show spinner only if empty */
mLlEmptyWallet.setVisibility(View.GONE);
mLlBannerInfo.setVisibility(View.VISIBLE);
// mLlBannerInfo.setVisibility(View.VISIBLE);
}
} else {
if (WarplyManagerHelper.getShowVouchersBanner().equals("true")) {
......@@ -799,10 +799,10 @@ public class MyRewardsFragment extends Fragment implements View.OnClickListener
&& (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)
&& checkHistoryEmpty()) {
/** Hide loyalty banners and hide separator */
mLlBannerInfo.setVisibility(View.GONE);
// mLlBannerInfo.setVisibility(View.GONE);
} else {
/** Show loyalty banners and show separator */
mLlBannerInfo.setVisibility(View.VISIBLE);
// mLlBannerInfo.setVisibility(View.VISIBLE);
}
} else if (WarplyManagerHelper.getShowVouchersBanner().equals("false")) {
/** 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
&& (WarplyManagerHelper.getCouponList() != null && WarplyManagerHelper.getCouponList().size() == 0)
&& checkHistoryEmpty()) {
/** Hide loyalty banners and hide empty view and hide disabled separator */
mLlBannerInfo.setVisibility(View.GONE);
// mLlBannerInfo.setVisibility(View.GONE);
mLlEmptyWallet.setVisibility(View.GONE);
} else {
/** Show loyalty banners and show disabled separator */
mLlBannerInfo.setVisibility(View.VISIBLE);
// mLlBannerInfo.setVisibility(View.VISIBLE);
}
}
}
......
......@@ -25,6 +25,8 @@
package ly.warp.sdk.io.models;
import android.app.Activity;
/**
* Created by Panagiotis Triantafyllou on 01-May-24.
*/
......@@ -32,6 +34,7 @@ package ly.warp.sdk.io.models;
public class WarplyBoxAnalysisEventModel {
private boolean isPressed = false;
private Activity mActivity;
public WarplyBoxAnalysisEventModel() {
......@@ -45,4 +48,12 @@ public class WarplyBoxAnalysisEventModel {
public void setPressed(boolean pressed) {
isPressed = pressed;
}
public Activity getActivity() {
return mActivity;
}
public void setActivity(Activity mActivity) {
this.mActivity = mActivity;
}
}
......
......@@ -18,9 +18,7 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="14dp"
android:layout_marginTop="16dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
......