正在查看: Mint v5.7.3 应用的 s.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 s.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package x5;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.ObservableBoolean;
import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.flexbox.FlexboxLayoutManager;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.htmedia.mint.AppController;
import com.htmedia.mint.mymint.pojo.MintDataItem;
import com.htmedia.mint.pojo.Content;
import com.htmedia.mint.pojo.Image;
import com.htmedia.mint.pojo.LeadMedia;
import com.htmedia.mint.pojo.appwidgetpojo.DEWidgetResponseModel;
import com.htmedia.mint.pojo.appwidgetpojo.Item;
import com.htmedia.mint.pojo.config.Config;
import com.htmedia.mint.pojo.notificationsetting.NotificationMasterResponse;
import com.htmedia.mint.pojo.onBoarding.setting.Section;
import com.htmedia.mint.pojo.onBoarding.setting.SectionPref;
import com.htmedia.mint.pojo.onBoarding.setting.SectionPreferences;
import com.htmedia.mint.pojo.onBoarding.setting.SettingPrefMain;
import com.htmedia.mint.ui.activity.PrefSettingsNewActivity;
import com.htmedia.mint.utils.o1;
import com.htmedia.mint.utils.q;
import com.htmedia.sso.helpers.ToastHelper;
import com.htmedia.sso.network.NetworkHelper;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import kotlin.Function;
import kotlin.Metadata;
import kotlin.jvm.internal.Lambda;
import org.json.JSONObject;
import q7.q5;
import q7.s5;
import t5.a;
import v5.l;
import x4.me0;
import x5.s;
import y7.r4;
import z7.h;
@Metadata(d1 = {"\u0000\u008e\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\r\u0018\u00002\u00020\u00012\u00020\u00022\u00020\u00032\u00020\u0004:\u0001HB\u0015\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\b¢\u0006\u0002\u0010\tJ6\u0010\u001d\u001a\u00020\u001e2\u0006\u0010\u0007\u001a\u00020\b2\u0006\u0010\u001f\u001a\u00020\u00132\u0006\u0010 \u001a\u00020\u001c2\u0006\u0010!\u001a\u00020\u001a2\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0018\u001a\u00020\rJ\u001a\u0010\"\u001a\b\u0012\u0004\u0012\u00020$0#2\f\u0010%\u001a\b\u0012\u0004\u0012\u00020$0#J\u001c\u0010&\u001a\u00020\u001e2\b\u0010'\u001a\u0004\u0018\u00010(2\b\u0010)\u001a\u0004\u0018\u00010\u001cH\u0016J\b\u0010*\u001a\u00020\u001cH\u0002J\u0010\u0010+\u001a\u00020\u001e2\u0006\u0010\u0007\u001a\u00020\bH\u0002J\u0006\u0010,\u001a\u00020\u001eJ\u0012\u0010-\u001a\u00020\u001e2\b\u0010.\u001a\u0004\u0018\u00010(H\u0016J\u0016\u0010/\u001a\u0002002\f\u0010%\u001a\b\u0012\u0004\u0012\u00020$0#H\u0002J\u0012\u00101\u001a\u00020\u001e2\b\u00102\u001a\u0004\u0018\u00010\u001cH\u0016J\u001c\u00101\u001a\u00020\u001e2\b\u00102\u001a\u0004\u0018\u00010\u001c2\b\u00103\u001a\u0004\u0018\u00010\u001cH\u0016J\u0018\u00104\u001a\u00020\u001e2\u0006\u00105\u001a\u00020$2\u0006\u0010\u0018\u001a\u00020\rH\u0017J \u00106\u001a\u0012\u0012\u0004\u0012\u00020807j\b\u0012\u0004\u0012\u000208`92\u0006\u0010.\u001a\u00020(H\u0002J\"\u0010:\u001a\u00020\u001e2\b\u0010;\u001a\u0004\u0018\u00010<2\u0006\u0010\u0012\u001a\u00020\u00132\u0006\u0010\u001b\u001a\u00020\u001cH\u0002J\u001a\u0010=\u001a\u00020\u001e2\b\u0010;\u001a\u0004\u0018\u00010<2\u0006\u0010\u001b\u001a\u00020\u001cH\u0002J\u0012\u0010>\u001a\u00020\u001e2\b\u0010;\u001a\u0004\u0018\u00010<H\u0002J \u0010?\u001a\u00020\u001e2\u0006\u0010\u0007\u001a\u00020\b2\u0006\u0010\u001b\u001a\u00020\u001c2\u0006\u0010@\u001a\u00020\u001cH\u0002J\u0014\u0010A\u001a\u00020\u001e2\f\u0010%\u001a\b\u0012\u0004\u0012\u00020$0#J\u0016\u0010B\u001a\u00020\u001e2\f\u0010C\u001a\b\u0012\u0004\u0012\u00020$0#H\u0002J\b\u0010D\u001a\u00020\u001eH\u0007J\u0006\u0010E\u001a\u00020\u001eJ\u0006\u0010F\u001a\u00020\u001eJ\u0006\u0010G\u001a\u00020\u001eR\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\rX\u0082\u000e¢\u0006\u0002\n\u0000R\u0011\u0010\u000e\u001a\u00020\u000f¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u000e\u0010\u0012\u001a\u00020\u0013X\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\u0014\u001a\u00020\u0015X\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\u0016\u001a\u00020\u0017X\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\u0018\u001a\u00020\rX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0019\u001a\u00020\u001aX\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\u001b\u001a\u00020\u001cX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006I"}, d2 = {"Lcom/htmedia/mint/mymint/viewholders/MyFeedViewHolder;", "Landroidx/recyclerview/widget/RecyclerView$ViewHolder;", "Lcom/htmedia/mint/ui/adapters/PrefListener;", "Lcom/htmedia/mint/presenter/CollectionsWidgetInterface;", "Lcom/htmedia/mint/presenter/CompanyGenericViewInterface;", "binding", "Lcom/htmedia/mint/databinding/MyFeedLayoutBinding;", "activity", "Landroidx/appcompat/app/AppCompatActivity;", "(Lcom/htmedia/mint/databinding/MyFeedLayoutBinding;Landroidx/appcompat/app/AppCompatActivity;)V", "getActivity", "()Landroidx/appcompat/app/AppCompatActivity;", "count", "", "handler", "Landroid/os/Handler;", "getHandler", "()Landroid/os/Handler;", "itemData", "Lcom/htmedia/mint/mymint/pojo/MintDataItem;", "listener", "Lcom/htmedia/mint/mymint/viewholders/MyFeedViewHolder$OnMyFeedViewMoreClick;", "mViewModel", "Lcom/htmedia/mint/ui/viewModels/onBoardingSplash/SettingsPrefViewModel;", "position", "recyclerview", "Landroidx/recyclerview/widget/RecyclerView;", "tabName", "", "bind", "", "mintDataItem", "tabname", "recyclerView", "filterSelectedSection", "", "Lcom/htmedia/mint/pojo/onBoarding/setting/Section;", "list", "getAboutCompanyData", "response", "Lorg/json/JSONObject;", "urlTag", "getAddedPrefNamesWithCommaSeprate", "getMyfeedData", "getSettingPreferences", "getStoryData", "jsonObject", "ifHasSelectedItems", "", "onError", "message", "url", "onToogleClicked", "section", "parseDEWidgetData", "Ljava/util/ArrayList;", "Lcom/htmedia/mint/pojo/Content;", "Lkotlin/collections/ArrayList;", "sendMyFeedCollectionImpressionEvent", "context", "Landroid/content/Context;", "sendMyFeedDonebuttonClickEvent", "sendOnItemClickWidgetEvent", "sendOnSectionItemClickWidgetEvent", "sectionName", "setAdapterList", "setSelectedSectionsData", "selectedSectionsList", "setUpViewModel", "showLoader", "showNewsAndRoundSectionLayout", "showsectionPrefLayout", "OnMyFeedViewMoreClick", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class s extends RecyclerView.ViewHolder implements q5, k6.i, k6.q {
private final me0 a;
private final AppCompatActivity b;
private RecyclerView c;
private z7.t d;
private a e;
private String f;
private MintDataItem g;
private final Handler h;
private int i;
private int j;
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\bf\u0018\u00002\u00020\u0001J\u0010\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H&J\b\u0010\u0006\u001a\u00020\u0003H&ø\u0001\u0000\u0082\u0002\u0006\n\u0004\b!0\u0001¨\u0006\u0007À\u0006\u0001"}, d2 = {"Lcom/htmedia/mint/mymint/viewholders/MyFeedViewHolder$OnMyFeedViewMoreClick;", "", "gotoMtFeedTab", "", "isMyFeedTab", "", "refreshMyFeedTab", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public interface a {
void m(boolean z);
}
@Metadata(d1 = {"\u0000\u000f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001¨\u0006\u0003"}, d2 = {"com/htmedia/mint/mymint/viewholders/MyFeedViewHolder$getAboutCompanyData$typeToken$1", "Lcom/google/gson/reflect/TypeToken;", "Lcom/htmedia/mint/pojo/onBoarding/setting/SettingPrefMain;", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public static final class b extends TypeToken<SettingPrefMain> {
b() {
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
static final class c implements Observer, kotlin.jvm.internal.g {
private final fh.l a;
c(fh.l function) {
kotlin.jvm.internal.m.g(function, "function");
this.a = function;
}
public final boolean equals(Object obj) {
if ((obj instanceof Observer) && (obj instanceof kotlin.jvm.internal.g)) {
return kotlin.jvm.internal.m.b(getFunctionDelegate(), ((kotlin.jvm.internal.g) obj).getFunctionDelegate());
}
return false;
}
@Override
public final Function<?> getFunctionDelegate() {
return this.a;
}
public final int hashCode() {
return getFunctionDelegate().hashCode();
}
public final void onChanged(Object obj) {
this.a.invoke(obj);
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", "it", "Lcom/htmedia/mint/pojo/notificationsetting/NotificationMasterResponse;", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
static final class d extends Lambda implements fh.l<NotificationMasterResponse, kotlin.a0> {
d() {
super(1);
}
@Override
public kotlin.a0 invoke(NotificationMasterResponse notificationMasterResponse) {
invoke2(notificationMasterResponse);
return kotlin.a0.a;
}
public final void invoke2(NotificationMasterResponse it) {
kotlin.jvm.internal.m.g(it, "it");
if (it.getSuccess()) {
v5.l.x.d(true);
v5.t.p.b(true);
RecyclerView recyclerView = s.this.c;
if (recyclerView == null) {
kotlin.jvm.internal.m.w("recyclerview");
recyclerView = null;
}
RecyclerView.Adapter adapter = recyclerView.getAdapter();
if (adapter != null) {
adapter.notifyItemChanged(s.this.j);
}
AppCompatActivity b = s.this.getB();
SectionPreferences sectionPreferences = new SectionPreferences();
sectionPreferences.setPreferencesSet(true);
com.htmedia.mint.utils.f0.a4(b, h.a.c.b(), sectionPreferences);
r4 n = AppController.j().n();
kotlin.jvm.internal.m.f(n, "getOnboardWatchListViewModel(...)");
r4.S(n, b, false, 2, (Object) null);
int backStackEntryCount = b.getSupportFragmentManager().getBackStackEntryCount() - 1;
if (backStackEntryCount >= 0) {
v5.l backStackEntryAt = b.getSupportFragmentManager().getBackStackEntryAt(backStackEntryCount);
kotlin.jvm.internal.m.e(backStackEntryAt, "null cannot be cast to non-null type com.htmedia.mint.mymint.fragment.MyMintHomeFragment");
backStackEntryAt.V();
}
}
}
}
@Metadata(d1 = {"\u0000\u001f\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J \u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\u0007H\u0016¨\u0006\t"}, d2 = {"com/htmedia/mint/mymint/viewholders/MyFeedViewHolder$setUpViewModel$2", "Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;", "onScrolled", "", "mRecyclerView", "Landroidx/recyclerview/widget/RecyclerView;", "dx", "", "dy", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public static final class e extends RecyclerView.OnScrollListener {
e() {
}
public void onScrolled(RecyclerView mRecyclerView, int dx, int dy) {
kotlin.jvm.internal.m.g(mRecyclerView, "mRecyclerView");
super.onScrolled(mRecyclerView, dx, dy);
FlexboxLayoutManager layoutManager = mRecyclerView.getLayoutManager();
kotlin.jvm.internal.m.e(layoutManager, "null cannot be cast to non-null type com.google.android.flexbox.FlexboxLayoutManager");
FlexboxLayoutManager flexboxLayoutManager = layoutManager;
RecyclerView recyclerView = null;
if (flexboxLayoutManager.findLastCompletelyVisibleItemPosition() == flexboxLayoutManager.getItemCount() - 1) {
RecyclerView recyclerView2 = s.this.c;
if (recyclerView2 == null) {
kotlin.jvm.internal.m.w("recyclerview");
} else {
recyclerView = recyclerView2;
}
recyclerView.requestDisallowInterceptTouchEvent(false);
return;
}
if (flexboxLayoutManager.findFirstCompletelyVisibleItemPosition() == 0) {
RecyclerView recyclerView3 = s.this.c;
if (recyclerView3 == null) {
kotlin.jvm.internal.m.w("recyclerview");
} else {
recyclerView = recyclerView3;
}
recyclerView.requestDisallowInterceptTouchEvent(false);
return;
}
RecyclerView recyclerView4 = s.this.c;
if (recyclerView4 == null) {
kotlin.jvm.internal.m.w("recyclerview");
} else {
recyclerView = recyclerView4;
}
recyclerView.requestDisallowInterceptTouchEvent(true);
}
}
public s(me0 binding, AppCompatActivity activity) {
super(binding.getRoot());
kotlin.jvm.internal.m.g(binding, "binding");
kotlin.jvm.internal.m.g(activity, "activity");
this.a = binding;
this.b = activity;
this.f = "";
this.h = new Handler(Looper.getMainLooper());
}
private final String A() {
String c0;
z7.t tVar = this.d;
z7.t tVar2 = null;
if (tVar == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar = null;
}
ArrayList j = tVar.j();
if (j == null || j.isEmpty()) {
return "";
}
z7.t tVar3 = this.d;
if (tVar3 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
tVar2 = tVar3;
}
c0 = kotlin.collections.a0.c0(tVar2.j(), ", ", null, null, 0, null, null, 62, null);
return c0;
}
private final void B(AppCompatActivity appCompatActivity) {
MintDataItem mintDataItem;
l.a aVar = v5.l.x;
MintDataItem mintDataItem2 = null;
if (!aVar.b()) {
z7.t tVar = this.d;
if (tVar == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar = null;
}
if (tVar.k() != null) {
z7.t tVar2 = this.d;
if (tVar2 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar2 = null;
}
if (!tVar2.k().isEmpty()) {
RecyclerView recyclerView = this.a.c;
z7.t tVar3 = this.d;
if (tVar3 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar3 = null;
}
ArrayList k = tVar3.k();
ObservableBoolean a2 = aVar.a();
String str = this.f;
MintDataItem mintDataItem3 = this.g;
if (mintDataItem3 == null) {
kotlin.jvm.internal.m.w("itemData");
mintDataItem = null;
} else {
mintDataItem = mintDataItem3;
}
recyclerView.setAdapter(new r5.l(appCompatActivity, k, a2, "adapter_my_feed", str, mintDataItem));
R();
return;
}
}
}
aVar.d(false);
AppController.j().g();
if (com.htmedia.mint.utils.f0.G1(appCompatActivity, "userName") != null) {
kotlin.jvm.internal.m.d(com.htmedia.mint.utils.f0.G1(appCompatActivity, "userClient"));
} else {
kotlin.jvm.internal.m.d(f6.d.b(appCompatActivity));
}
StringBuilder sb = new StringBuilder();
MintDataItem mintDataItem4 = this.g;
if (mintDataItem4 == null) {
kotlin.jvm.internal.m.w("itemData");
} else {
mintDataItem2 = mintDataItem4;
}
sb.append(mintDataItem2.getNewsUrl());
sb.append("?htfpId=");
sb.append(com.htmedia.mint.utils.f0.I0(appCompatActivity));
sb.append("&propertyId=lm§ion=all&numStories=");
sb.append(this.i);
String sb2 = sb.toString();
if (TextUtils.isEmpty(sb2)) {
return;
}
k6.j jVar = new k6.j(appCompatActivity, this);
HashMap hashMap = new HashMap();
if (com.htmedia.mint.utils.f0.G1(appCompatActivity, "userName") != null) {
}
jVar.a(0, "rfu_url", sb2, (JSONObject) null, hashMap, false, false);
}
private final boolean D(List<Section> list) {
int size = list.size();
for (int i = 0; i < size; i++) {
if (list.get(i).isSelected()) {
return true;
}
}
return false;
}
private final ArrayList<Content> E(JSONObject jSONObject) {
String C;
ArrayList<Content> arrayList = new ArrayList<>();
try {
DEWidgetResponseModel dEWidgetResponseModel = (DEWidgetResponseModel) new Gson().fromJson(jSONObject.toString(), DEWidgetResponseModel.class);
if (dEWidgetResponseModel != null && oh.v.t(dEWidgetResponseModel.getStatus(), FirebaseAnalytics.Param.SUCCESS, true) && dEWidgetResponseModel.getItems() != null && dEWidgetResponseModel.getItems().size() > 0) {
int size = dEWidgetResponseModel.getItems().size();
for (int i = 0; i < size; i++) {
Content content = new Content();
Item item = (Item) dEWidgetResponseModel.getItems().get(i);
LeadMedia leadMedia = new LeadMedia();
Image image = new Image();
image.setImages(item.getImageObject());
leadMedia.setImage(image);
content.setLeadMedia(leadMedia);
content.setId(item.getStoryId());
content.setMobileHeadline(item.getHeadline());
content.setHeadline(item.getHeadline());
content.setTimeToRead(item.getTimeToRead());
String publishDate = item.getPublishDate();
kotlin.jvm.internal.m.f(publishDate, "getPublishDate(...)");
C = oh.v.C(publishDate, " ", "T", false, 4, null);
content.setLastPublishedDate(C);
content.setType(j5.b.STORY.a());
content.setPersonalisedSection(item.getPersonalisedSection());
content.setPersonalisedSectionId(item.getPersonalisedSectionId());
com.htmedia.mint.pojo.Metadata metadata = new com.htmedia.mint.pojo.Metadata();
metadata.setSection(item.getSectionName());
metadata.setSubSection("");
metadata.setUrl(item.getStoryURL());
metadata.setPremiumStory(item.isPremiumStory());
metadata.setAgency("");
Boolean bool = Boolean.FALSE;
metadata.setSponsored(bool);
metadata.setBreakingNews(bool);
metadata.setBigStory(bool);
metadata.setColumn("");
metadata.setGenericOpenStory(item.isGenericOpenStory());
content.setMetadata(metadata);
arrayList.add(content);
}
}
} catch (JsonSyntaxException e2) {
e2.printStackTrace();
}
return arrayList;
}
private final void F(Context context, MintDataItem mintDataItem, String str) {
String str2 = "/mymint/" + com.htmedia.mint.utils.h0.f(str) + "/my_feed";
a.C0090a c0090a = t5.a.a;
String COLLECTION_IMPRESSION = com.htmedia.mint.utils.n.f2;
kotlin.jvm.internal.m.f(COLLECTION_IMPRESSION, "COLLECTION_IMPRESSION");
String[] strArr = new String[2];
String title = mintDataItem.getTitle();
if (title == null) {
title = "My feed";
}
strArr[0] = title;
strArr[1] = "my mint";
c0090a.g(context, COLLECTION_IMPRESSION, str2, str2, "my feed", strArr);
}
private final void G(Context context, String str) {
String f = com.htmedia.mint.utils.h0.f(str);
String s0 = com.htmedia.mint.utils.n.s0(A(), 100);
kotlin.jvm.internal.m.f(s0, "truncateScreenName(...)");
String str2 = "/mymint/" + f + "/my_feed";
a.C0090a c0090a = t5.a.a;
String WIDGET_ITEM_CLICK = com.htmedia.mint.utils.n.Z1;
kotlin.jvm.internal.m.f(WIDGET_ITEM_CLICK, "WIDGET_ITEM_CLICK");
c0090a.i(context, WIDGET_ITEM_CLICK, str2, str2, "my feed", "done", "my mint", s0);
}
private final void H(Context context) {
String str = "/mymint/" + this.f + "/my_feed";
a.C0090a c0090a = t5.a.a;
String COLLECTION_ITEM_CLICK = com.htmedia.mint.utils.n.c2;
kotlin.jvm.internal.m.f(COLLECTION_ITEM_CLICK, "COLLECTION_ITEM_CLICK");
c0090a.h(context, COLLECTION_ITEM_CLICK, str, str, null, "my feed", "see more stories", "my mint");
}
private final void I(AppCompatActivity appCompatActivity, String str, String str2) {
String str3 = "/mymint/" + com.htmedia.mint.utils.h0.f(str) + "/my_feed";
a.C0090a c0090a = t5.a.a;
String COLLECTION_ITEM_CLICK = com.htmedia.mint.utils.n.c2;
kotlin.jvm.internal.m.f(COLLECTION_ITEM_CLICK, "COLLECTION_ITEM_CLICK");
c0090a.h(appCompatActivity, COLLECTION_ITEM_CLICK, str3, str3, null, "my feed", str2, "my mint");
}
public static final void K(s this$0) {
kotlin.jvm.internal.m.g(this$0, "this$0");
this$0.B(this$0.b);
}
public static final void L(s this$0, View view) {
kotlin.jvm.internal.m.g(this$0, "this$0");
this$0.I(this$0.b, this$0.f, "add more");
Intent intent = new Intent((Context) this$0.b, (Class<?>) PrefSettingsNewActivity.class);
intent.putExtra("prefOrigin", q.h0.e.name());
this$0.b.startActivity(intent);
}
public static final void M(Config config, s this$0, View view) {
z7.t tVar;
kotlin.jvm.internal.m.g(this$0, "this$0");
String submitUrl = (config == null || config.getPreferencesOnBoardingConfig() == null || config.getPreferencesOnBoardingConfig().getContent() == null || TextUtils.isEmpty(config.getPreferencesOnBoardingConfig().getContent().getSettingsPreferences().getSubmitUrl())) ? "http://10.136.162.185/putpreferences" : config.getPreferencesOnBoardingConfig().getContent().getSettingsPreferences().getSubmitUrl();
z7.t tVar2 = this$0.d;
z7.t tVar3 = null;
if (tVar2 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar2 = null;
}
if (tVar2.t().size() <= 0) {
Toast.makeText((Context) this$0.b, (CharSequence) "Please select atleast 1 topic of interest to move ahead", 0).show();
return;
}
z7.t tVar4 = this$0.d;
if (tVar4 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar = null;
} else {
tVar = tVar4;
}
kotlin.jvm.internal.m.d(submitUrl);
AppCompatActivity appCompatActivity = this$0.b;
z7.t tVar5 = this$0.d;
if (tVar5 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar5 = null;
}
tVar.M(submitUrl, appCompatActivity, false, tVar5.t(), "settings");
Log.e("refreshMyFeedTab", "outside if");
this$0.G(this$0.b, this$0.f);
AppCompatActivity appCompatActivity2 = this$0.b;
MintDataItem mintDataItem = this$0.g;
if (mintDataItem == null) {
kotlin.jvm.internal.m.w("itemData");
mintDataItem = null;
}
this$0.F(appCompatActivity2, mintDataItem, this$0.f);
z7.t tVar6 = this$0.d;
if (tVar6 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
tVar3 = tVar6;
}
tVar3.A().observe(this$0.b, new c(this$0.new d()));
}
private final void N(List<Section> list) {
this.a.g.setLayoutManager(new LinearLayoutManager(this.b, 0, false));
RecyclerView recyclerView = this.a.g;
AppCompatActivity appCompatActivity = this.b;
MintDataItem mintDataItem = this.g;
if (mintDataItem == null) {
kotlin.jvm.internal.m.w("itemData");
mintDataItem = null;
}
recyclerView.setAdapter(new r5.o(appCompatActivity, list, mintDataItem, this.f));
}
public static final boolean P(s this$0, View view, MotionEvent motionEvent) {
kotlin.jvm.internal.m.g(this$0, "this$0");
kotlin.jvm.internal.m.d(motionEvent);
if (motionEvent.getAction() != 0) {
return false;
}
RecyclerView recyclerView = this$0.c;
if (recyclerView == null) {
kotlin.jvm.internal.m.w("recyclerview");
recyclerView = null;
}
recyclerView.requestDisallowInterceptTouchEvent(true);
return false;
}
public static final void x(s this$0) {
kotlin.jvm.internal.m.g(this$0, "this$0");
this$0.O();
}
public static final void y(a listener, s this$0, AppCompatActivity activity, View view) {
kotlin.jvm.internal.m.g(listener, "$listener");
kotlin.jvm.internal.m.g(this$0, "this$0");
kotlin.jvm.internal.m.g(activity, "$activity");
listener.m(true);
this$0.H(activity);
}
public final void C() {
String str = "";
Config g = AppController.j().g();
if (g == null || g.getPreferencesOnBoardingConfig().getContent() == null || g.getPreferencesOnBoardingConfig().getContent().getSettingsPreferences() == null || TextUtils.isEmpty(g.getPreferencesOnBoardingConfig().getContent().getSettingsPreferences().getGetUrl())) {
return;
}
try {
AppCompatActivity appCompatActivity = this.b;
kotlin.jvm.internal.m.e(appCompatActivity, "null cannot be cast to non-null type android.content.Context");
k6.p pVar = new k6.p(appCompatActivity, this, "");
HashMap hashMap = new HashMap();
hashMap.put("X-Platform", "LM");
hashMap.put("X-OS", "Android");
String b2 = f6.d.b(this.b);
kotlin.jvm.internal.m.f(b2, "getAndroidID(...)");
hashMap.put("X-Device-Id", b2);
if (com.htmedia.mint.utils.f0.G1(this.b, "userName") != null) {
str = com.htmedia.mint.utils.f0.G1(this.b, "userClient");
kotlin.jvm.internal.m.d(str);
}
if (!TextUtils.isEmpty(str)) {
hashMap.put("X-Client-Id", str);
}
hashMap.put("X-App-Version", "5.7.3");
pVar.l(g.getPreferencesOnBoardingConfig().getContent().getSettingsPreferences().getGetUrl(), hashMap);
} catch (Exception e2) {
e2.printStackTrace();
AppCompatActivity appCompatActivity2 = this.b;
ToastHelper.showToast(appCompatActivity2, NetworkHelper.getErrorMessage(appCompatActivity2, e2));
}
}
public final void J(List<Section> list) {
kotlin.jvm.internal.m.g(list, "list");
MintDataItem mintDataItem = null;
if (D(list)) {
MintDataItem mintDataItem2 = this.g;
if (mintDataItem2 == null) {
kotlin.jvm.internal.m.w("itemData");
} else {
mintDataItem = mintDataItem2;
}
mintDataItem.setCollection(true);
List<Section> z = z(list);
o1.a("myFeed", "selectedlist final size :" + z.size());
N(z);
this.h.postDelayed(new Runnable() {
@Override
public final void run() {
s.K(s.this);
}
}, 500L);
this.a.a.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
s.L(s.this, view);
}
});
return;
}
z7.t tVar = this.d;
if (tVar == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar = null;
}
tVar.t().clear();
MintDataItem mintDataItem3 = this.g;
if (mintDataItem3 == null) {
kotlin.jvm.internal.m.w("itemData");
mintDataItem3 = null;
}
mintDataItem3.setCollection(false);
S();
FlexboxLayoutManager flexboxLayoutManager = new FlexboxLayoutManager(this.b);
flexboxLayoutManager.setFlexDirection(0);
flexboxLayoutManager.setJustifyContent(0);
this.a.h.setLayoutManager(flexboxLayoutManager);
RecyclerView recyclerView = this.a.h;
MintDataItem mintDataItem4 = this.c;
if (mintDataItem4 == null) {
kotlin.jvm.internal.m.w("recyclerview");
} else {
mintDataItem = mintDataItem4;
}
recyclerView.setAdapter(new s5(list, this, false, mintDataItem));
final Config r0 = com.htmedia.mint.utils.f0.r0();
this.a.o.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
s.M(r0, this, view);
}
});
}
@android.annotation.SuppressLint({"ClickableViewAccessibility"})
public final void O() {
throw new UnsupportedOperationException("Method not decompiled: x5.s.O():void");
}
public final void Q() {
this.a.e.setVisibility(0);
this.a.b.setVisibility(8);
this.a.f.setVisibility(8);
this.a.i.setVisibility(8);
}
public final void R() {
this.a.e.setVisibility(8);
this.a.b.setVisibility(0);
this.a.f.setVisibility(0);
this.a.i.setVisibility(8);
}
public final void S() {
this.a.e.setVisibility(8);
this.a.b.setVisibility(8);
this.a.f.setVisibility(8);
this.a.i.setVisibility(0);
}
public void getAboutCompanyData(JSONObject response, String urlTag) {
String json = new Gson().toJson(String.valueOf(response));
kotlin.jvm.internal.m.f(json, "toJson(...)");
z7.t tVar = null;
if (!TextUtils.isEmpty(json) && !kotlin.jvm.internal.m.b(json, "null")) {
z7.t tVar2 = this.d;
if (tVar2 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar2 = null;
}
tVar2.E("section", json, this.b);
}
z7.t tVar3 = this.d;
if (tVar3 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar3 = null;
}
tVar3.o().clear();
for (Section section : ((SettingPrefMain) new Gson().fromJson(String.valueOf(response), new b().getType())).getSectionPreferences().getSections()) {
z7.t tVar4 = this.d;
if (tVar4 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar4 = null;
}
List o = tVar4.o();
kotlin.jvm.internal.m.d(section);
o.add(section);
if (!section.getSubSections().isEmpty()) {
for (Section section2 : section.getSubSections()) {
z7.t tVar5 = this.d;
if (tVar5 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar5 = null;
}
List o2 = tVar5.o();
kotlin.jvm.internal.m.d(section2);
o2.add(section2);
}
}
}
z7.t tVar6 = this.d;
if (tVar6 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar6 = null;
}
z7.t tVar7 = this.d;
if (tVar7 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar7 = null;
}
tVar6.P(tVar7.o(), this.b);
z7.t tVar8 = this.d;
if (tVar8 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar8 = null;
}
tVar8.m().setValue(Boolean.TRUE);
o1.a("SettingsPrefViewModel", "inside observer");
z7.t tVar9 = this.d;
if (tVar9 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar9 = null;
}
if (tVar9.o().isEmpty()) {
z7.t tVar10 = this.d;
if (tVar10 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar10 = null;
}
if (!TextUtils.isEmpty(tVar10.C("section", this.b))) {
z7.t tVar11 = this.d;
if (tVar11 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar11 = null;
}
if (!kotlin.jvm.internal.m.b(tVar11.C("section", this.b), "null\n")) {
z7.t tVar12 = this.d;
if (tVar12 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar12 = null;
}
String C = tVar12.C("section", this.b);
z7.t tVar13 = this.d;
if (tVar13 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar13 = null;
}
tVar13.H(C);
z7.t tVar14 = this.d;
if (tVar14 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
tVar = tVar14;
}
J(tVar.o());
}
}
z7.t tVar15 = this.d;
if (tVar15 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar15 = null;
}
if (TextUtils.isEmpty(tVar15.D(this.b))) {
this.a.h.setVisibility(8);
} else {
z7.t tVar16 = this.d;
if (tVar16 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar16 = null;
}
String D = tVar16.D(this.b);
z7.t tVar17 = this.d;
if (tVar17 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar17 = null;
}
tVar17.H(D);
z7.t tVar18 = this.d;
if (tVar18 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
tVar = tVar18;
}
J(tVar.o());
}
} else {
z7.t tVar19 = this.d;
if (tVar19 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
tVar = tVar19;
}
J(tVar.o());
}
this.a.d.setVisibility(0);
}
public final AppCompatActivity getB() {
return this.b;
}
public void getStoryData(JSONObject jsonObject) {
MintDataItem mintDataItem;
R();
if (jsonObject != null) {
ArrayList<Content> E = E(jsonObject);
if (E == null || E.isEmpty()) {
this.a.d.setVisibility(8);
return;
}
RecyclerView recyclerView = this.a.c;
AppCompatActivity appCompatActivity = this.b;
ObservableBoolean a2 = v5.l.x.a();
String str = this.f;
MintDataItem mintDataItem2 = this.g;
z7.t tVar = null;
if (mintDataItem2 == null) {
kotlin.jvm.internal.m.w("itemData");
mintDataItem = null;
} else {
mintDataItem = mintDataItem2;
}
recyclerView.setAdapter(new r5.l(appCompatActivity, E, a2, "adapter_my_feed", str, mintDataItem));
this.a.d.setVisibility(0);
z7.t tVar2 = this.d;
if (tVar2 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
tVar = tVar2;
}
ArrayList<Content> E2 = E(jsonObject);
kotlin.jvm.internal.m.e(E2, "null cannot be cast to non-null type java.util.ArrayList<com.htmedia.mint.pojo.Content>{ kotlin.collections.TypeAliasesKt.ArrayList<com.htmedia.mint.pojo.Content> }");
tVar.F(E2);
}
}
public void onError(String message) {
this.a.d.setVisibility(8);
}
public void onError(String message, String url) {
this.a.d.setVisibility(8);
}
@SuppressLint({"NotifyDataSetChanged"})
public void onToogleClicked(Section section, int position) {
kotlin.jvm.internal.m.g(section, "section");
section.setSelected(!section.isSelected());
z7.t tVar = this.d;
z7.t tVar2 = null;
if (tVar == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar = null;
}
tVar.o().set(position, section);
SectionPref sectionPref = new SectionPref(section.getId(), section.isSelected());
if (section.isSelected()) {
z7.t tVar3 = this.d;
if (tVar3 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar3 = null;
}
tVar3.u().add(section.getName());
}
z7.t tVar4 = this.d;
if (tVar4 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar4 = null;
}
if (tVar4.t().containsKey(Long.valueOf(section.getId()))) {
z7.t tVar5 = this.d;
if (tVar5 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar5 = null;
}
tVar5.t().remove(Long.valueOf(section.getId()));
z7.t tVar6 = this.d;
if (tVar6 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
tVar2 = tVar6;
}
tVar2.j().remove(section.getName());
} else {
z7.t tVar7 = this.d;
if (tVar7 == null) {
kotlin.jvm.internal.m.w("mViewModel");
tVar7 = null;
}
tVar7.j().add(section.getName());
z7.t tVar8 = this.d;
if (tVar8 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
tVar2 = tVar8;
}
tVar2.t().put(Long.valueOf(section.getId()), sectionPref);
}
RecyclerView.Adapter adapter = this.a.h.getAdapter();
if (adapter != null) {
adapter.notifyDataSetChanged();
}
}
public final void w(final AppCompatActivity activity, MintDataItem mintDataItem, String tabname, RecyclerView recyclerView, final a listener, int i) {
kotlin.jvm.internal.m.g(activity, "activity");
kotlin.jvm.internal.m.g(mintDataItem, "mintDataItem");
kotlin.jvm.internal.m.g(tabname, "tabname");
kotlin.jvm.internal.m.g(recyclerView, "recyclerView");
kotlin.jvm.internal.m.g(listener, "listener");
this.f = tabname;
this.g = mintDataItem;
this.c = recyclerView;
this.a.e(v5.l.x.a());
me0 me0Var = this.a;
MintDataItem mintDataItem2 = this.g;
if (mintDataItem2 == null) {
kotlin.jvm.internal.m.w("itemData");
mintDataItem2 = null;
}
me0Var.f(mintDataItem2);
this.j = i;
Integer maxLimit = mintDataItem.getMaxLimit();
kotlin.jvm.internal.m.d(maxLimit);
if (maxLimit.intValue() > 0) {
Integer maxLimit2 = mintDataItem.getMaxLimit();
kotlin.jvm.internal.m.d(maxLimit2);
this.i = maxLimit2.intValue();
} else {
this.i = 6;
}
this.h.postDelayed(new Runnable() {
@Override
public final void run() {
s.x(s.this);
}
}, 500L);
this.e = listener;
this.a.j.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
s.y(s.a.this, this, activity, view);
}
});
}
public final List<Section> z(List<Section> list) {
kotlin.jvm.internal.m.g(list, "list");
ArrayList arrayList = new ArrayList();
int size = list.size();
for (int i = 0; i < size; i++) {
if (list.get(i).isSelected()) {
arrayList.add(list.get(i));
}
}
return arrayList;
}
}