正在查看: SpeedCash v6.5.1482 应用的 PointsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: SpeedCash v6.5.1482 应用的 PointsActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.bm.sc.kotlin.ui.points;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.bm.sc.bebasbayar.R;
import com.bm.sc.bebasbayar.handler.MessageComposer;
import com.bm.sc.bebasbayar.handler.MessageSender;
import com.bm.sc.bebasbayar.iface.MessageProcess;
import com.bm.sc.bebasbayar.message.BaseMessage;
import com.bm.sc.bebasbayar.message.api.APIMessageWrapper;
import com.bm.sc.bebasbayar.message.qr.DataMessage;
import com.bm.sc.bebasbayar.setting.session.AppSession;
import com.bm.sc.bebasbayar.ui.BaseActivity;
import com.bm.sc.bebasbayar.ui.fragment.dialog.DetailVoucherFragment;
import com.bm.sc.kotlin.adapter.PointsExploreAdapter;
import com.bm.sc.kotlin.adapter.PointsMonthlyAdapter;
import com.bm.sc.kotlin.adapter.entity.PointExploreEntity;
import com.bm.sc.kotlin.adapter.entity.PointMonthlyEntity;
import com.bm.sc.kotlin.adapter.entity.PointMutationEntity;
import com.bm.sc.kotlin.ui.points.PointsActivity;
import com.bm.sc.util.android.Device;
import com.bm.sc.util.common.Var;
import com.bm.sc.util.format.Locales;
import com.facebook.share.internal.ShareConstants;
import com.google.android.material.tabs.TabLayout;
import com.wdullaer.materialdatetimepicker.date.MonthView;
import defpackage.CASE_INSENSITIVE_ORDER;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(d1 = {"\u0000d\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u000f\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b;\u0010<J\u0012\u0010\u0006\u001a\u00020\u00052\b\u0010\u0004\u001a\u0004\u0018\u00010\u0003H\u0014J\b\u0010\b\u001a\u00020\u0007H\u0014J\b\u0010\n\u001a\u00020\tH\u0016J\b\u0010\f\u001a\u00020\u000bH\u0014J\u0010\u0010\u000e\u001a\u00020\u00052\u0006\u0010\r\u001a\u00020\u0007H\u0016J\b\u0010\u000f\u001a\u00020\u0005H\u0002J\b\u0010\u0010\u001a\u00020\u0005H\u0002R\u0016\u0010\u0014\u001a\u00020\u00118\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\u0012\u0010\u0013R&\u0010\u001a\u001a\u0012\u0012\u0004\u0012\u00020\u00160\u0015j\b\u0012\u0004\u0012\u00020\u0016`\u00178\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0018\u0010\u0019R\u0016\u0010\u001e\u001a\u00020\u001b8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\u001c\u0010\u001dR&\u0010!\u001a\u0012\u0012\u0004\u0012\u00020\u001f0\u0015j\b\u0012\u0004\u0012\u00020\u001f`\u00178\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b \u0010\u0019R\u0016\u0010#\u001a\u00020\u001b8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\"\u0010\u001dR&\u0010%\u001a\u0012\u0012\u0004\u0012\u00020\u001f0\u0015j\b\u0012\u0004\u0012\u00020\u001f`\u00178\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b$\u0010\u0019R\u0018\u0010)\u001a\u0004\u0018\u00010&8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b'\u0010(R\u0018\u0010+\u001a\u0004\u0018\u00010&8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b*\u0010(R\u0018\u0010-\u001a\u0004\u0018\u00010&8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b,\u0010(R\"\u0010/\u001a\u00020.8\u0006@\u0006X\u0086.¢\u0006\u0012\n\u0004\b/\u00100\u001a\u0004\b1\u00102\"\u0004\b3\u00104R\"\u00105\u001a\u00020.8\u0006@\u0006X\u0086.¢\u0006\u0012\n\u0004\b5\u00100\u001a\u0004\b6\u00102\"\u0004\b7\u00104R\"\u00108\u001a\u00020.8\u0006@\u0006X\u0086.¢\u0006\u0012\n\u0004\b8\u00100\u001a\u0004\b9\u00102\"\u0004\b:\u00104¨\u0006="}, d2 = {"Lcom/bm/sc/kotlin/ui/points/PointsActivity;", "Lcom/bm/sc/bebasbayar/ui/BaseActivity;", "Lcom/bm/sc/kotlin/adapter/PointsExploreAdapter$PointExploreClicked;", "Landroid/os/Bundle;", "savedInstanceState", "", "onCreate", "", "getLayoutResource", "", "isEligibleForFavorit", "", "getWikiNameSpace", "position", "onClickedPointExplore", "v", "u", "Lcom/bm/sc/kotlin/adapter/PointsExploreAdapter;", "c", "Lcom/bm/sc/kotlin/adapter/PointsExploreAdapter;", "pointsExploreAdapter", "Ljava/util/ArrayList;", "Lcom/bm/sc/kotlin/adapter/entity/PointExploreEntity;", "Lkotlin/collections/ArrayList;", "d", "Ljava/util/ArrayList;", "listExplorePoint", "Lcom/bm/sc/kotlin/adapter/PointsMonthlyAdapter;", "e", "Lcom/bm/sc/kotlin/adapter/PointsMonthlyAdapter;", "pointsMonthlyGetAdapter", "Lcom/bm/sc/kotlin/adapter/entity/PointMonthlyEntity;", "f", "listPointMonthlyGet", "g", "pointsMonthlyUseAdapter", "h", "listPointMonthlyUse", "Landroid/widget/TextView;", "i", "Landroid/widget/TextView;", "tv_point_count", "j", "tv_point_count_info", "k", "tv_point_expired_info", "Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;", "swipe_rv_explore_point", "Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;", "getSwipe_rv_explore_point", "()Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;", "setSwipe_rv_explore_point", "(Landroidx/swiperefreshlayout/widget/SwipeRefreshLayout;)V", "swipe_rv_get_point", "getSwipe_rv_get_point", "setSwipe_rv_get_point", "swipe_rv_used_point", "getSwipe_rv_used_point", "setSwipe_rv_used_point", "<init>", "()V", "app_release"}, k = 1, mv = {1, 8, 0})
public final class PointsActivity extends BaseActivity implements PointsExploreAdapter.PointExploreClicked {
public PointsExploreAdapter pointsExploreAdapter;
public PointsMonthlyAdapter pointsMonthlyGetAdapter;
public PointsMonthlyAdapter pointsMonthlyUseAdapter;
@Nullable
public TextView tv_point_count;
@Nullable
public TextView tv_point_count_info;
@Nullable
public TextView tv_point_expired_info;
public SwipeRefreshLayout swipe_rv_explore_point;
public SwipeRefreshLayout swipe_rv_get_point;
public SwipeRefreshLayout swipe_rv_used_point;
@NotNull
public ArrayList<PointExploreEntity> listExplorePoint = new ArrayList<>();
@NotNull
public ArrayList<PointMonthlyEntity> listPointMonthlyGet = new ArrayList<>();
@NotNull
public ArrayList<PointMonthlyEntity> listPointMonthlyUse = new ArrayList<>();
public static final void A(PointsActivity this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.getSwipe_rv_used_point().setRefreshing(true);
this$0.u();
this$0.v();
this$0.getSwipe_rv_used_point().setRefreshing(false);
}
public static final void w() {
}
public static final void x(PointsActivity this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.u();
this$0.v();
}
public static final void y(PointsActivity this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.getSwipe_rv_explore_point().setRefreshing(true);
this$0.u();
this$0.v();
this$0.getSwipe_rv_explore_point().setRefreshing(false);
}
public static final void z(PointsActivity this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.getSwipe_rv_get_point().setRefreshing(true);
this$0.u();
this$0.v();
this$0.getSwipe_rv_get_point().setRefreshing(false);
}
@Override
public int getLayoutResource() {
return R.layout.activity_points_2;
}
@NotNull
public final SwipeRefreshLayout getSwipe_rv_explore_point() {
SwipeRefreshLayout swipeRefreshLayout = this.swipe_rv_explore_point;
if (swipeRefreshLayout != null) {
return swipeRefreshLayout;
}
Intrinsics.throwUninitializedPropertyAccessException("swipe_rv_explore_point");
return null;
}
@NotNull
public final SwipeRefreshLayout getSwipe_rv_get_point() {
SwipeRefreshLayout swipeRefreshLayout = this.swipe_rv_get_point;
if (swipeRefreshLayout != null) {
return swipeRefreshLayout;
}
Intrinsics.throwUninitializedPropertyAccessException("swipe_rv_get_point");
return null;
}
@NotNull
public final SwipeRefreshLayout getSwipe_rv_used_point() {
SwipeRefreshLayout swipeRefreshLayout = this.swipe_rv_used_point;
if (swipeRefreshLayout != null) {
return swipeRefreshLayout;
}
Intrinsics.throwUninitializedPropertyAccessException("swipe_rv_used_point");
return null;
}
@Override
@NotNull
public String getWikiNameSpace() {
String classSimpleName = getClassSimpleName();
Intrinsics.checkNotNullExpressionValue(classSimpleName, "classSimpleName");
return classSimpleName;
}
@Override
public boolean isEligibleForFavorit() {
return false;
}
@Override
public void onClickedPointExplore(int position) {
PointExploreEntity pointExploreEntity = this.listExplorePoint.get(position);
Intrinsics.checkNotNullExpressionValue(pointExploreEntity, "listExplorePoint[position]");
DetailVoucherFragment newInstance = DetailVoucherFragment.newInstance();
Intrinsics.checkNotNullExpressionValue(newInstance, "newInstance()");
newInstance.setInitView(pointExploreEntity);
newInstance.setOnSaveListener(new DetailVoucherFragment.OnSaveListener() {
@Override
public final void onSaveValue() {
PointsActivity.w();
}
});
newInstance.show(getSupportFragmentManager(), "sort");
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.pointsExploreAdapter = new PointsExploreAdapter();
View findViewById = findViewById(R.id.rv_explore_point);
Intrinsics.checkNotNullExpressionValue(findViewById, "findViewById(R.id.rv_explore_point)");
final RecyclerView recyclerView = (RecyclerView) findViewById;
recyclerView.setLayoutManager(new LinearLayoutManager(recyclerView.getContext()));
recyclerView.setNestedScrollingEnabled(false);
PointsExploreAdapter pointsExploreAdapter = this.pointsExploreAdapter;
PointsMonthlyAdapter pointsMonthlyAdapter = null;
if (pointsExploreAdapter == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsExploreAdapter");
pointsExploreAdapter = null;
}
recyclerView.setAdapter(pointsExploreAdapter);
PointsExploreAdapter pointsExploreAdapter2 = this.pointsExploreAdapter;
if (pointsExploreAdapter2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsExploreAdapter");
pointsExploreAdapter2 = null;
}
pointsExploreAdapter2.loadData(this.listExplorePoint);
PointsExploreAdapter pointsExploreAdapter3 = this.pointsExploreAdapter;
if (pointsExploreAdapter3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsExploreAdapter");
pointsExploreAdapter3 = null;
}
pointsExploreAdapter3.setListener(this);
this.pointsMonthlyGetAdapter = new PointsMonthlyAdapter();
View findViewById2 = findViewById(R.id.rv_get_point);
Intrinsics.checkNotNullExpressionValue(findViewById2, "findViewById(R.id.rv_get_point)");
RecyclerView recyclerView2 = (RecyclerView) findViewById2;
recyclerView2.setLayoutManager(new LinearLayoutManager(recyclerView2.getContext()));
recyclerView2.setNestedScrollingEnabled(false);
PointsMonthlyAdapter pointsMonthlyAdapter2 = this.pointsMonthlyGetAdapter;
if (pointsMonthlyAdapter2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsMonthlyGetAdapter");
pointsMonthlyAdapter2 = null;
}
recyclerView2.setAdapter(pointsMonthlyAdapter2);
PointsMonthlyAdapter pointsMonthlyAdapter3 = this.pointsMonthlyGetAdapter;
if (pointsMonthlyAdapter3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsMonthlyGetAdapter");
pointsMonthlyAdapter3 = null;
}
pointsMonthlyAdapter3.loadData(this.listPointMonthlyGet);
this.pointsMonthlyUseAdapter = new PointsMonthlyAdapter();
View findViewById3 = findViewById(R.id.rv_used_point);
Intrinsics.checkNotNullExpressionValue(findViewById3, "findViewById(R.id.rv_used_point)");
RecyclerView recyclerView3 = (RecyclerView) findViewById3;
recyclerView3.setLayoutManager(new LinearLayoutManager(recyclerView3.getContext()));
recyclerView3.setNestedScrollingEnabled(false);
PointsMonthlyAdapter pointsMonthlyAdapter4 = this.pointsMonthlyUseAdapter;
if (pointsMonthlyAdapter4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsMonthlyUseAdapter");
pointsMonthlyAdapter4 = null;
}
recyclerView3.setAdapter(pointsMonthlyAdapter4);
PointsMonthlyAdapter pointsMonthlyAdapter5 = this.pointsMonthlyUseAdapter;
if (pointsMonthlyAdapter5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsMonthlyUseAdapter");
} else {
pointsMonthlyAdapter = pointsMonthlyAdapter5;
}
pointsMonthlyAdapter.loadData(this.listPointMonthlyUse);
((LinearLayout) findViewById(R.id.linearLayoutEmptyPoint)).setVisibility(8);
findViewById(R.id.cl_get_point).setVisibility(8);
findViewById(R.id.cl_used_point).setVisibility(8);
View findViewById4 = findViewById(R.id.tab_layout);
Intrinsics.checkNotNullExpressionValue(findViewById4, "findViewById(R.id.tab_layout)");
TabLayout tabLayout = (TabLayout) findViewById4;
tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
@Override
public void onTabReselected(@Nullable TabLayout.Tab tab) {
}
@Override
public void onTabSelected(@Nullable TabLayout.Tab tab) {
ArrayList arrayList;
ArrayList arrayList2;
Integer valueOf = tab != null ? Integer.valueOf(tab.getPosition()) : null;
if (valueOf != null && valueOf.intValue() == 0) {
RecyclerView.this.setVisibility(0);
this.findViewById(R.id.cl_get_point).setVisibility(8);
this.findViewById(R.id.cl_used_point).setVisibility(8);
((LinearLayout) this.findViewById(R.id.linearLayoutEmptyPoint)).setVisibility(8);
return;
}
if (valueOf != null && valueOf.intValue() == 1) {
RecyclerView.this.setVisibility(8);
this.findViewById(R.id.cl_get_point).setVisibility(0);
((LinearLayout) this.findViewById(R.id.linearLayoutEmptyPoint)).setVisibility(8);
arrayList2 = this.listPointMonthlyGet;
if (arrayList2.size() == 0) {
((LinearLayout) this.findViewById(R.id.linearLayoutEmptyPoint)).setVisibility(0);
return;
} else {
this.findViewById(R.id.cl_used_point).setVisibility(8);
return;
}
}
if (valueOf != null && valueOf.intValue() == 2) {
RecyclerView.this.setVisibility(8);
this.findViewById(R.id.cl_get_point).setVisibility(8);
((LinearLayout) this.findViewById(R.id.linearLayoutEmptyPoint)).setVisibility(8);
arrayList = this.listPointMonthlyUse;
if (arrayList.size() == 0) {
((LinearLayout) this.findViewById(R.id.linearLayoutEmptyPoint)).setVisibility(0);
} else {
this.findViewById(R.id.cl_used_point).setVisibility(0);
}
}
}
@Override
public void onTabUnselected(@Nullable TabLayout.Tab tab) {
}
});
tabLayout.selectTab(tabLayout.getTabAt(0));
this.tv_point_count = (TextView) findViewById(R.id.tv_point_count);
this.tv_point_count_info = (TextView) findViewById(R.id.tv_point_count_info);
AppSession appSession = this.appSession;
Intrinsics.checkNotNull(appSession);
double d = Var.toDouble(appSession.retrieve(AppSession.PROPERTY_POIN), 0.0d);
this.tv_point_expired_info = (TextView) findViewById(R.id.tv_point_expired_info);
if (d > 0.0d) {
AppSession appSession2 = this.appSession;
Intrinsics.checkNotNull(appSession2);
String moneyNoFraction = Locales.moneyNoFraction(appSession2.retrieve(AppSession.PROPERTY_POIN));
Intrinsics.checkNotNullExpressionValue(moneyNoFraction, "moneyNoFraction(appSessi…ppSession.PROPERTY_POIN))");
TextView textView = this.tv_point_count;
if (textView != null) {
textView.setText(CASE_INSENSITIVE_ORDER.replace$default(moneyNoFraction, "Rp", "", false, 4, (Object) null));
}
TextView textView2 = this.tv_point_count_info;
if (textView2 != null) {
textView2.setText("Setara dengan " + moneyNoFraction);
}
TextView textView3 = this.tv_point_expired_info;
if (textView3 != null) {
textView3.setText("Gunakan poinmu yuk");
}
} else {
TextView textView4 = this.tv_point_count;
if (textView4 != null) {
textView4.setText("0");
}
TextView textView5 = this.tv_point_count_info;
if (textView5 != null) {
textView5.setText("Poin masih kosong");
}
TextView textView6 = this.tv_point_expired_info;
if (textView6 != null) {
textView6.setText("Transaksi pakai voucher biar dapat poin");
}
}
u();
v();
TextView textView7 = (TextView) findViewById(R.id.tv_refresh);
if (textView7 != null) {
textView7.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PointsActivity.x(PointsActivity.this, view);
}
});
}
View findViewById5 = findViewById(R.id.swipe_rv_explore_point);
Intrinsics.checkNotNullExpressionValue(findViewById5, "findViewById(R.id.swipe_rv_explore_point)");
setSwipe_rv_explore_point((SwipeRefreshLayout) findViewById5);
getSwipe_rv_explore_point().setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public final void onRefresh() {
PointsActivity.y(PointsActivity.this);
}
});
View findViewById6 = findViewById(R.id.swipe_rv_get_point);
Intrinsics.checkNotNullExpressionValue(findViewById6, "findViewById(R.id.swipe_rv_get_point)");
setSwipe_rv_get_point((SwipeRefreshLayout) findViewById6);
getSwipe_rv_get_point().setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public final void onRefresh() {
PointsActivity.z(PointsActivity.this);
}
});
View findViewById7 = findViewById(R.id.swipe_rv_used_point);
Intrinsics.checkNotNullExpressionValue(findViewById7, "findViewById(R.id.swipe_rv_used_point)");
setSwipe_rv_used_point((SwipeRefreshLayout) findViewById7);
getSwipe_rv_used_point().setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public final void onRefresh() {
PointsActivity.A(PointsActivity.this);
}
});
}
public final void setSwipe_rv_explore_point(@NotNull SwipeRefreshLayout swipeRefreshLayout) {
Intrinsics.checkNotNullParameter(swipeRefreshLayout, "<set-?>");
this.swipe_rv_explore_point = swipeRefreshLayout;
}
public final void setSwipe_rv_get_point(@NotNull SwipeRefreshLayout swipeRefreshLayout) {
Intrinsics.checkNotNullParameter(swipeRefreshLayout, "<set-?>");
this.swipe_rv_get_point = swipeRefreshLayout;
}
public final void setSwipe_rv_used_point(@NotNull SwipeRefreshLayout swipeRefreshLayout) {
Intrinsics.checkNotNullParameter(swipeRefreshLayout, "<set-?>");
this.swipe_rv_used_point = swipeRefreshLayout;
}
public final void u() {
MessageComposer messageComposer = new MessageComposer(7, "ro/activity/voucher");
messageComposer.setRequest_method("GET");
messageComposer.setData_type(2);
AppSession appSession = this.appSession;
Intrinsics.checkNotNull(appSession);
messageComposer.addMessage("user_id", appSession.retrieve(AppSession.PROPERTY_MERCHANT_ID));
messageComposer.addMessage("user_uuid", Device.getDeviceUUID(this).toString());
messageComposer.addMessage(BaseMessage.INDEX_VIA, "BB ANDROID");
messageComposer.addMessage("satuan", "poin");
messageComposer.setShowProgressRegular(true);
messageComposer.setMessageProcess(new MessageProcess() {
@Override
public void afterProcess(@NotNull BaseMessage msg) {
ArrayList arrayList;
PointsExploreAdapter pointsExploreAdapter;
ArrayList arrayList2;
ArrayList arrayList3;
Intrinsics.checkNotNullParameter(msg, "msg");
arrayList = PointsActivity.this.listExplorePoint;
if (arrayList != null) {
arrayList3 = PointsActivity.this.listExplorePoint;
arrayList3.clear();
}
APIMessageWrapper aPIMessageWrapper = new APIMessageWrapper(msg);
if (aPIMessageWrapper.isOK()) {
Iterator<HashMap<String, Object>> it = aPIMessageWrapper.getData().iterator();
while (it.hasNext()) {
HashMap<String, Object> next = it.next();
String str = "Min. Pembayaran " + Var.toString(next.get("min_beli"), "-");
String var = Var.toString(next.get("kode_voucher"), "");
Intrinsics.checkNotNullExpressionValue(var, "toString(list[\"kode_voucher\"], \"\")");
String var2 = Var.toString(next.get("product"), "");
Intrinsics.checkNotNullExpressionValue(var2, "toString(list[\"product\"], \"\")");
String var3 = Var.toString(next.get(ShareConstants.FEED_CAPTION_PARAM), "");
Intrinsics.checkNotNullExpressionValue(var3, "toString(list[\"caption\"], \"\")");
String var4 = Var.toString(next.get("expired"), "");
Intrinsics.checkNotNullExpressionValue(var4, "toString(list[\"expired\"], \"\")");
String var5 = Var.toString(next.get("instruction"), "");
Intrinsics.checkNotNullExpressionValue(var5, "toString(list[\"instruction\"], \"\")");
String var6 = Var.toString(next.get("sk"), "");
Intrinsics.checkNotNullExpressionValue(var6, "toString(list[\"sk\"], \"\")");
String var7 = Var.toString(next.get("description"), "");
Intrinsics.checkNotNullExpressionValue(var7, "toString(list[\"description\"], \"\")");
PointExploreEntity pointExploreEntity = new PointExploreEntity(var, var2, var3, str, var4, var5, var6, var7);
arrayList2 = PointsActivity.this.listExplorePoint;
arrayList2.add(pointExploreEntity);
}
pointsExploreAdapter = PointsActivity.this.pointsExploreAdapter;
if (pointsExploreAdapter == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsExploreAdapter");
pointsExploreAdapter = null;
}
pointsExploreAdapter.notifyDataSetChanged();
}
}
@Override
public void backgroundProcess(long bytesRead, long contentLength, boolean done) {
}
@Override
public void preProcess() {
}
});
new MessageSender(this, messageComposer).execute();
}
public final void v() {
MessageComposer messageComposer = new MessageComposer(7, "ro/activity/mutasi_poin");
messageComposer.setRequest_method("GET");
messageComposer.setData_type(2);
AppSession appSession = this.appSession;
Intrinsics.checkNotNull(appSession);
messageComposer.addMessage("user_id", appSession.retrieve(AppSession.PROPERTY_MERCHANT_ID));
messageComposer.addMessage("user_uuid", Device.getDeviceUUID(this).toString());
messageComposer.addMessage(BaseMessage.INDEX_VIA, "BB ANDROID");
messageComposer.setShowProgressRegular(true);
messageComposer.setMessageProcess(new MessageProcess() {
@Override
public void afterProcess(@NotNull BaseMessage msg) {
ArrayList arrayList;
ArrayList arrayList2;
PointsMonthlyAdapter pointsMonthlyAdapter;
PointsMonthlyAdapter pointsMonthlyAdapter2;
ArrayList arrayList3;
ArrayList arrayList4;
Intrinsics.checkNotNullParameter(msg, "msg");
APIMessageWrapper aPIMessageWrapper = new APIMessageWrapper(msg);
arrayList = PointsActivity.this.listPointMonthlyGet;
arrayList.clear();
arrayList2 = PointsActivity.this.listPointMonthlyUse;
arrayList2.clear();
if (aPIMessageWrapper.isOK()) {
Iterator<HashMap<String, Object>> it = aPIMessageWrapper.getData().iterator();
while (it.hasNext()) {
HashMap<String, Object> next = it.next();
String monthName = Var.toString(next.get(MonthView.VIEW_PARAMS_MONTH), "");
ArrayList arrayList5 = Var.toArrayList(next.get("lists"));
ArrayList arrayList6 = new ArrayList();
ArrayList arrayList7 = new ArrayList();
Iterator it2 = arrayList5.iterator();
while (it2.hasNext()) {
HashMap hashMap = (HashMap) it2.next();
String var = Var.toString(hashMap.get(DataMessage.ID_TRANSAKSI), "");
Intrinsics.checkNotNullExpressionValue(var, "toString(datum[\"id_transaksi\"], \"\")");
String var2 = Var.toString(hashMap.get("poin"), "");
Intrinsics.checkNotNullExpressionValue(var2, "toString(datum[\"poin\"], \"\")");
String var3 = Var.toString(hashMap.get("id_produk"), "");
Intrinsics.checkNotNullExpressionValue(var3, "toString(datum[\"id_produk\"], \"\")");
String var4 = Var.toString(hashMap.get("produk"), "");
Intrinsics.checkNotNullExpressionValue(var4, "toString(datum[\"produk\"], \"\")");
String var5 = Var.toString(hashMap.get("kategori"), "");
Intrinsics.checkNotNullExpressionValue(var5, "toString(datum[\"kategori\"], \"\")");
String var6 = Var.toString(hashMap.get("waktu_transaksi"), "");
Intrinsics.checkNotNullExpressionValue(var6, "toString(datum[\"waktu_transaksi\"], \"\")");
PointMutationEntity pointMutationEntity = new PointMutationEntity(var, var2, var3, var4, var5, var6);
if (CASE_INSENSITIVE_ORDER.equals(pointMutationEntity.getKategori(), "PEMASUKAN", true)) {
arrayList6.add(pointMutationEntity);
}
if (CASE_INSENSITIVE_ORDER.equals(pointMutationEntity.getKategori(), "PENGELUARAN", true)) {
arrayList7.add(pointMutationEntity);
}
}
if (arrayList6.size() > 0) {
arrayList4 = PointsActivity.this.listPointMonthlyGet;
Intrinsics.checkNotNullExpressionValue(monthName, "monthName");
arrayList4.add(new PointMonthlyEntity(monthName, arrayList6));
}
if (arrayList7.size() > 0) {
arrayList3 = PointsActivity.this.listPointMonthlyUse;
Intrinsics.checkNotNullExpressionValue(monthName, "monthName");
arrayList3.add(new PointMonthlyEntity(monthName, arrayList7));
}
}
pointsMonthlyAdapter = PointsActivity.this.pointsMonthlyGetAdapter;
PointsMonthlyAdapter pointsMonthlyAdapter3 = null;
if (pointsMonthlyAdapter == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsMonthlyGetAdapter");
pointsMonthlyAdapter = null;
}
pointsMonthlyAdapter.notifyDataSetChanged();
pointsMonthlyAdapter2 = PointsActivity.this.pointsMonthlyUseAdapter;
if (pointsMonthlyAdapter2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("pointsMonthlyUseAdapter");
} else {
pointsMonthlyAdapter3 = pointsMonthlyAdapter2;
}
pointsMonthlyAdapter3.notifyDataSetChanged();
}
}
@Override
public void backgroundProcess(long bytesRead, long contentLength, boolean done) {
}
@Override
public void preProcess() {
}
});
new MessageSender(this, messageComposer).execute();
}
}