正在查看: Mint v5.7.3 应用的 t.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 t.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package v5;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.ObservableBoolean;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
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.R;
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.SettingPrefMain;
import com.htmedia.mint.ui.activity.PrefSettingsNewActivity;
import com.htmedia.mint.utils.f0;
import com.htmedia.mint.utils.h0;
import com.htmedia.mint.utils.m0;
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.Iterator;
import java.util.List;
import kotlin.Function;
import kotlin.Metadata;
import kotlin.a0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.e0;
import org.json.JSONObject;
import q7.q5;
import q7.s5;
import t5.a;
import v5.t;
import x4.oe0;
import y7.n2;
@Metadata(d1 = {"\u0000¸\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010 \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\u0000\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u000b\u0018\u0000 X2\u00020\u00012\u00020\u00022\u00020\u00032\u00020\u0004:\u0001XB\u0005¢\u0006\u0002\u0010\u0005J\u0016\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u001d\u001a\u00020\tJ\u001a\u0010\u001e\u001a\b\u0012\u0004\u0012\u00020 0\u001f2\f\u0010!\u001a\b\u0012\u0004\u0012\u00020 0\u001fJ\u001c\u0010\"\u001a\u00020\u001a2\b\u0010#\u001a\u0004\u0018\u00010$2\b\u0010%\u001a\u0004\u0018\u00010\u0016H\u0016J\b\u0010&\u001a\u00020\u0016H\u0002J\u0010\u0010'\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u001cH\u0002J\u0006\u0010(\u001a\u00020\u001aJ\u0012\u0010)\u001a\u00020\u001a2\b\u0010*\u001a\u0004\u0018\u00010$H\u0016J\u0016\u0010+\u001a\b\u0012\u0004\u0012\u00020\u00120,2\u0006\u0010-\u001a\u00020.H\u0002J\u0016\u0010/\u001a\u00020\t2\f\u0010!\u001a\b\u0012\u0004\u0012\u00020 0\u001fH\u0002J\u0012\u00100\u001a\u00020\u001a2\b\u00101\u001a\u0004\u0018\u000102H\u0016J$\u00103\u001a\u0002042\u0006\u00105\u001a\u0002062\b\u00107\u001a\u0004\u0018\u0001082\b\u00101\u001a\u0004\u0018\u000102H\u0016J\u0012\u00109\u001a\u00020\u001a2\b\u0010:\u001a\u0004\u0018\u00010\u0016H\u0016J\u001c\u00109\u001a\u00020\u001a2\b\u0010:\u001a\u0004\u0018\u00010\u00162\b\u0010;\u001a\u0004\u0018\u00010\u0016H\u0016J\b\u0010<\u001a\u00020\u001aH\u0016J\u0018\u0010=\u001a\u00020\u001a2\u0006\u0010>\u001a\u00020 2\u0006\u0010?\u001a\u00020\u0012H\u0017J \u0010@\u001a\u0012\u0012\u0004\u0012\u00020B0Aj\b\u0012\u0004\u0012\u00020B`C2\u0006\u0010*\u001a\u00020$H\u0002J\u001a\u0010D\u001a\u00020\u001a2\b\u0010E\u001a\u0004\u0018\u00010F2\u0006\u0010\u0018\u001a\u00020\u0016H\u0002J \u0010G\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u0018\u001a\u00020\u00162\u0006\u0010H\u001a\u00020\u0016H\u0002J\u001c\u0010I\u001a\u00020\u001a2\f\u0010!\u001a\b\u0012\u0004\u0012\u00020 0\u001f2\u0006\u0010\u001b\u001a\u00020\u001cJL\u0010J\u001a\u00020\u001a2\b\u0010\u001b\u001a\u0004\u0018\u00010K2\u0016\u0010L\u001a\u0012\u0012\u0004\u0012\u00020B0Aj\b\u0012\u0004\u0012\u00020B`C2\u0006\u0010M\u001a\u00020N2\u0006\u0010O\u001a\u00020\u00162\u0006\u0010\u0018\u001a\u00020\u00162\b\u0010P\u001a\u0004\u0018\u00010\u0014H\u0002J\u0016\u0010Q\u001a\u00020\u001a2\f\u0010R\u001a\b\u0012\u0004\u0012\u00020 0\u001fH\u0002J\b\u0010S\u001a\u00020\u001aH\u0002J\u0010\u0010T\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u001cH\u0007J\u0006\u0010U\u001a\u00020\u001aJ\u0006\u0010V\u001a\u00020\u001aJ\u0006\u0010W\u001a\u00020\u001aR\u000e\u0010\u0006\u001a\u00020\u0007X\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u0011\u0010\n\u001a\u00020\u000b¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u000e\u0010\u000e\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u000f\u001a\u00020\u0010X\u0082.¢\u0006\u0002\n\u0000R\u000e\u0010\u0011\u001a\u00020\u0012X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0013\u001a\u0004\u0018\u00010\u0014X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0015\u001a\u00020\u0016X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0017\u001a\u00020\u0016X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0018\u001a\u00020\u0016X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006Y"}, d2 = {"Lcom/htmedia/mint/mymint/fragment/TabMyFeedFragment;", "Landroidx/fragment/app/Fragment;", "Lcom/htmedia/mint/ui/adapters/PrefListener;", "Lcom/htmedia/mint/presenter/CollectionsWidgetInterface;", "Lcom/htmedia/mint/presenter/CompanyGenericViewInterface;", "()V", "binding", "Lcom/htmedia/mint/databinding/MyFeedLayoutTabBinding;", "bool", "", "handler", "Landroid/os/Handler;", "getHandler", "()Landroid/os/Handler;", "isMatch", "mViewModel", "Lcom/htmedia/mint/ui/viewModels/onBoardingSplash/SettingsPrefViewModelTab;", "maxLimit", "", "mintDataItem", "Lcom/htmedia/mint/mymint/pojo/MintDataItem;", "newsurl", "", "tAG", "tabName", "bind", "", "activity", "Landroidx/appcompat/app/AppCompatActivity;", "boolean", "filterSelectedSection", "", "Lcom/htmedia/mint/pojo/onBoarding/setting/Section;", "list", "getAboutCompanyData", "response", "Lorg/json/JSONObject;", "urlTag", "getAddedPrefNamesWithCommaSeprate", "getMyfeedData", "getSettingPreferences", "getStoryData", "jsonObject", "getVisibleItemsInWindow", "", "recyclerView", "Landroidx/recyclerview/widget/RecyclerView;", "ifHasSelectedItems", "onActivityCreated", "savedInstanceState", "Landroid/os/Bundle;", "onCreateView", "Landroid/view/View;", "inflater", "Landroid/view/LayoutInflater;", "container", "Landroid/view/ViewGroup;", "onError", "message", "url", "onResume", "onToogleClicked", "section", "position", "parseDEWidgetData", "Ljava/util/ArrayList;", "Lcom/htmedia/mint/pojo/Content;", "Lkotlin/collections/ArrayList;", "sendMyFeedDonebuttonClickEvent", "context", "Landroid/content/Context;", "sendOnSectionItemClickWidgetEvent", "sectionName", "setAdapterList", "setNewsRecyclerViewAdapter", "Landroidx/fragment/app/FragmentActivity;", "arrayList", "nightModeObserver", "Landroidx/databinding/ObservableBoolean;", "ADAPTER_TAB_MY_FEED", "itemData", "setSelectedSectionsData", "selectedSectionsList", "setUpErrorView", "setUpViewModel", "showLoader", "showNewsAndRoundSectionLayout", "showsectionPrefLayout", "Companion", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class t extends Fragment implements q5, k6.i, k6.q {
public static final a p = new a(null);
private static boolean q;
private oe0 c;
private z7.w d;
private boolean f;
private MintDataItem i;
private boolean j;
private String a = "TabMyFeedFragment";
private String e = "";
private String g = "";
private int h = 40;
private final Handler o = new Handler(Looper.getMainLooper());
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J \u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00020\u000b2\u0006\u0010\r\u001a\u00020\u000eH\u0007R\u001a\u0010\u0003\u001a\u00020\u0004X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0003\u0010\u0005\"\u0004\b\u0006\u0010\u0007¨\u0006\u000f"}, d2 = {"Lcom/htmedia/mint/mymint/fragment/TabMyFeedFragment$Companion;", "", "()V", "isMyFeedDataRefreshed", "", "()Z", "setMyFeedDataRefreshed", "(Z)V", "newInstance", "Lcom/htmedia/mint/mymint/fragment/TabMyFeedFragment;", "tabName", "", "newsurl", "mintDataItem", "Lcom/htmedia/mint/mymint/pojo/MintDataItem;", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public static final class a {
private a() {
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final t a(String tabName, String newsurl, MintDataItem mintDataItem) {
kotlin.jvm.internal.m.g(tabName, "tabName");
kotlin.jvm.internal.m.g(newsurl, "newsurl");
kotlin.jvm.internal.m.g(mintDataItem, "mintDataItem");
t tVar = new t();
Bundle bundle = new Bundle();
bundle.putString("tab_name", tabName);
bundle.putString("tab_url", newsurl);
tVar.setArguments(bundle);
tVar.i = mintDataItem;
return tVar;
}
public final void b(boolean z) {
t.q = 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/fragment/TabMyFeedFragment$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(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/fragment/TabMyFeedFragment$onActivityCreated$3", "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 c extends RecyclerView.OnScrollListener {
c() {
}
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;
oe0 oe0Var = null;
if (flexboxLayoutManager.findLastCompletelyVisibleItemPosition() == flexboxLayoutManager.getItemCount() - 1) {
oe0 oe0Var2 = t.this.c;
if (oe0Var2 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var = oe0Var2;
}
oe0Var.d.requestDisallowInterceptTouchEvent(false);
return;
}
if (flexboxLayoutManager.findFirstCompletelyVisibleItemPosition() == 0) {
oe0 oe0Var3 = t.this.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var = oe0Var3;
}
oe0Var.d.requestDisallowInterceptTouchEvent(false);
return;
}
oe0 oe0Var4 = t.this.c;
if (oe0Var4 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var = oe0Var4;
}
oe0Var.d.requestDisallowInterceptTouchEvent(true);
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
static final class d implements Observer, kotlin.jvm.internal.g {
private final fh.l a;
d(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 e extends Lambda implements fh.l<NotificationMasterResponse, a0> {
final AppCompatActivity b;
e(AppCompatActivity appCompatActivity) {
super(1);
this.b = appCompatActivity;
}
@Override
public a0 invoke(NotificationMasterResponse notificationMasterResponse) {
invoke2(notificationMasterResponse);
return a0.a;
}
public final void invoke2(NotificationMasterResponse it) {
kotlin.jvm.internal.m.g(it, "it");
if (it.getSuccess()) {
z7.w wVar = t.this.d;
z7.w wVar2 = null;
if (wVar == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar = null;
}
if (wVar.h().isEmpty()) {
z7.w wVar3 = t.this.d;
if (wVar3 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar3 = null;
}
if (!TextUtils.isEmpty(wVar3.l("section", this.b))) {
z7.w wVar4 = t.this.d;
if (wVar4 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar4 = null;
}
if (!kotlin.jvm.internal.m.b(wVar4.l("section", this.b), "null\n")) {
z7.w wVar5 = t.this.d;
if (wVar5 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar5 = null;
}
String l = wVar5.l("section", this.b);
z7.w wVar6 = t.this.d;
if (wVar6 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar6 = null;
}
wVar6.p(l);
t tVar = t.this;
z7.w wVar7 = tVar.d;
if (wVar7 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
wVar2 = wVar7;
}
tVar.O(wVar2.h(), this.b);
}
}
z7.w wVar8 = t.this.d;
if (wVar8 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar8 = null;
}
if (TextUtils.isEmpty(wVar8.m(this.b))) {
z7.w wVar9 = t.this.c;
if (wVar9 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
wVar2 = wVar9;
}
wVar2.i.setVisibility(8);
} else {
z7.w wVar10 = t.this.d;
if (wVar10 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar10 = null;
}
String m = wVar10.m(this.b);
z7.w wVar11 = t.this.d;
if (wVar11 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar11 = null;
}
wVar11.p(m);
t tVar2 = t.this;
z7.w wVar12 = tVar2.d;
if (wVar12 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
wVar2 = wVar12;
}
tVar2.O(wVar2.h(), this.b);
}
} else {
t tVar3 = t.this;
z7.w wVar13 = tVar3.d;
if (wVar13 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
wVar2 = wVar13;
}
tVar3.O(wVar2.h(), this.b);
}
l.x.d(true);
}
}
}
@Metadata(d1 = {"\u0000\u001d\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\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0018\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0007H\u0016¨\u0006\b"}, d2 = {"com/htmedia/mint/mymint/fragment/TabMyFeedFragment$setNewsRecyclerViewAdapter$1", "Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;", "onScrollStateChanged", "", "recyclerView", "Landroidx/recyclerview/widget/RecyclerView;", "newState", "", "app_productionRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
public static final class f extends RecyclerView.OnScrollListener {
final String b;
final ArrayList<Content> c;
f(String str, ArrayList<Content> arrayList) {
this.b = str;
this.c = arrayList;
}
public static final void b(t this$0, RecyclerView recyclerView, ArrayList arrayList, e0 allPositions, e0 allStoryIds, String screenNameCustom, e0 eventLabel4) {
kotlin.jvm.internal.m.g(this$0, "this$0");
kotlin.jvm.internal.m.g(recyclerView, "$recyclerView");
kotlin.jvm.internal.m.g(arrayList, "$arrayList");
kotlin.jvm.internal.m.g(allPositions, "$allPositions");
kotlin.jvm.internal.m.g(allStoryIds, "$allStoryIds");
kotlin.jvm.internal.m.g(screenNameCustom, "$screenNameCustom");
kotlin.jvm.internal.m.g(eventLabel4, "$eventLabel4");
Iterator it = this$0.H(recyclerView).iterator();
while (true) {
if (!it.hasNext()) {
break;
}
int intValue = ((Number) it.next()).intValue();
if (intValue >= 0 && intValue < arrayList.size()) {
if (((CharSequence) allPositions.a).length() > 0) {
allPositions.a = ((String) allPositions.a) + ',';
}
allPositions.a = ((String) allPositions.a) + intValue;
if (((CharSequence) allStoryIds.a).length() > 0) {
allStoryIds.a = ((String) allStoryIds.a) + ',';
}
StringBuilder sb = new StringBuilder();
sb.append((String) allStoryIds.a);
Content content = (Content) arrayList.get(intValue);
sb.append(content != null ? Long.valueOf(content.getId()) : null);
allStoryIds.a = sb.toString();
}
}
if (!this$0.isAdded() || this$0.getContext() == null) {
return;
}
a.C0090a c0090a = t5.a.a;
Context context = this$0.getContext();
String COLLECTION_IMPRESSION = com.htmedia.mint.utils.n.f2;
kotlin.jvm.internal.m.f(COLLECTION_IMPRESSION, "COLLECTION_IMPRESSION");
c0090a.f(context, COLLECTION_IMPRESSION, (String) allPositions.a, screenNameCustom, screenNameCustom, "myfeed", allStoryIds.a, "", eventLabel4.a);
}
public void onScrollStateChanged(final RecyclerView recyclerView, int newState) {
kotlin.jvm.internal.m.g(recyclerView, "recyclerView");
super.onScrollStateChanged(recyclerView, newState);
final e0 e0Var = new e0();
e0Var.a = "";
final e0 e0Var2 = new e0();
e0Var2.a = "";
final e0 e0Var3 = new e0();
e0Var3.a = t.this.j ? "new_logic" : "old_logic";
final String str = "/mymint/" + this.b + "/my_feed";
if (newState == 0) {
final t tVar = t.this;
final ArrayList<Content> arrayList = this.c;
recyclerView.postDelayed(new Runnable() {
@Override
public final void run() {
t.f.b(t.this, recyclerView, arrayList, e0Var, e0Var2, str, e0Var3);
}
}, 100L);
}
}
}
private final String E() {
String c0;
z7.w wVar = this.d;
z7.w wVar2 = null;
if (wVar == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar = null;
}
ArrayList d2 = wVar.d();
if (d2 == null || d2.isEmpty()) {
return "";
}
z7.w wVar3 = this.d;
if (wVar3 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
wVar2 = wVar3;
}
c0 = kotlin.collections.a0.c0(wVar2.d(), ", ", null, null, 0, null, null, 62, null);
return c0;
}
private final void F(androidx.appcompat.app.AppCompatActivity r12) {
throw new UnsupportedOperationException("Method not decompiled: v5.t.F(androidx.appcompat.app.AppCompatActivity):void");
}
public final List<Integer> H(RecyclerView recyclerView) {
int childAdapterPosition;
ArrayList arrayList = new ArrayList();
Rect rect = new Rect();
recyclerView.getGlobalVisibleRect(rect);
rect.bottom -= f0.a0(56);
int childCount = recyclerView.getChildCount();
for (int i = 0; i < childCount; i++) {
View childAt = recyclerView.getChildAt(i);
if (childAt != null) {
Rect rect2 = new Rect();
if (childAt.getGlobalVisibleRect(rect2) && Rect.intersects(rect, rect2) && (childAdapterPosition = recyclerView.getChildAdapterPosition(childAt)) != -1) {
arrayList.add(Integer.valueOf(childAdapterPosition));
}
}
}
return arrayList;
}
private final boolean I(List<Section> list) {
int size = list.size();
for (int i = 0; i < size; i++) {
if (list.get(i).isSelected()) {
return true;
}
}
return false;
}
public static final void J(t this$0, View view) {
kotlin.jvm.internal.m.g(this$0, "this$0");
oe0 oe0Var = this$0.c;
oe0 oe0Var2 = null;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.f.setVisibility(0);
oe0 oe0Var3 = this$0.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var2 = oe0Var3;
}
oe0Var2.b.c.setVisibility(8);
FragmentActivity activity = this$0.getActivity();
kotlin.jvm.internal.m.e(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
this$0.C((AppCompatActivity) activity, false);
}
public static final void K(t this$0) {
kotlin.jvm.internal.m.g(this$0, "this$0");
oe0 oe0Var = this$0.c;
oe0 oe0Var2 = null;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.f.setVisibility(0);
oe0 oe0Var3 = this$0.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var2 = oe0Var3;
}
oe0Var2.b.c.setVisibility(8);
FragmentActivity activity = this$0.getActivity();
kotlin.jvm.internal.m.e(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
this$0.C((AppCompatActivity) activity, false);
}
public static final void L(t this$0) {
kotlin.jvm.internal.m.g(this$0, "this$0");
FragmentActivity activity = this$0.getActivity();
kotlin.jvm.internal.m.e(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
this$0.C((AppCompatActivity) activity, false);
}
private final void M(Context context, String str) {
String s0 = com.htmedia.mint.utils.n.s0(E(), 100);
kotlin.jvm.internal.m.f(s0, "truncateScreenName(...)");
String str2 = "/mymint/" + h0.f(str) + "/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 N(AppCompatActivity appCompatActivity, String str, String str2) {
String str3 = "/mymint/" + 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 P(t this$0, AppCompatActivity activity) {
kotlin.jvm.internal.m.g(this$0, "this$0");
kotlin.jvm.internal.m.g(activity, "$activity");
if (!this$0.isAdded() || this$0.isDetached()) {
Log.d(this$0.a, "Fragment not attached to activity, skipping delayed getMyfeedData call");
} else {
this$0.F(activity);
}
}
public static final void Q(t this$0, AppCompatActivity activity, View view) {
kotlin.jvm.internal.m.g(this$0, "this$0");
kotlin.jvm.internal.m.g(activity, "$activity");
this$0.N(activity, this$0.e, "add more");
Intent intent = new Intent((Context) activity, (Class<?>) PrefSettingsNewActivity.class);
intent.putExtra("prefOrigin", q.h0.e.name());
activity.startActivity(intent);
}
public static final void R(t this$0, Config config, AppCompatActivity activity, View view) {
z7.w wVar;
kotlin.jvm.internal.m.g(this$0, "this$0");
kotlin.jvm.internal.m.g(activity, "$activity");
this$0.W();
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.w wVar2 = this$0.d;
z7.w wVar3 = null;
if (wVar2 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar2 = null;
}
if (wVar2.i().size() <= 0) {
Toast.makeText((Context) activity, (CharSequence) "Please select atleast 1 topic of interest to move ahead", 0).show();
return;
}
z7.w wVar4 = this$0.d;
if (wVar4 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar = null;
} else {
wVar = wVar4;
}
kotlin.jvm.internal.m.d(submitUrl);
z7.w wVar5 = this$0.d;
if (wVar5 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar5 = null;
}
wVar.q(submitUrl, activity, false, wVar5.i(), "settings");
z7.w wVar6 = this$0.d;
if (wVar6 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
wVar3 = wVar6;
}
wVar3.k().observe(activity, new d(this$0.new e(activity)));
this$0.M(activity, this$0.e);
}
private final void S(FragmentActivity fragmentActivity, ArrayList<Content> arrayList, ObservableBoolean observableBoolean, String str, String str2, MintDataItem mintDataItem) {
if (!isAdded() || getContext() == null) {
Log.d(this.a, "Fragment not attached to context, skipping adapter setup");
return;
}
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
r5.l lVar = new r5.l(fragmentActivity, arrayList, observableBoolean, str, str2, mintDataItem);
oe0 oe0Var = this.c;
oe0 oe0Var2 = null;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.e.setLayoutManager(linearLayoutManager);
oe0 oe0Var3 = this.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var3 = null;
}
oe0Var3.e.setAdapter(lVar);
oe0 oe0Var4 = this.c;
if (oe0Var4 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var4 = null;
}
oe0Var4.e.setNestedScrollingEnabled(true);
oe0 oe0Var5 = this.c;
if (oe0Var5 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var2 = oe0Var5;
}
oe0Var2.e.addOnScrollListener(new f(str2, arrayList));
}
private final void T(List<Section> list) {
oe0 oe0Var = this.c;
oe0 oe0Var2 = null;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.h.setLayoutManager(new LinearLayoutManager(getActivity(), 0, false));
oe0 oe0Var3 = this.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var2 = oe0Var3;
}
RecyclerView recyclerView = oe0Var2.h;
AppCompatActivity activity = getActivity();
kotlin.jvm.internal.m.e(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
recyclerView.setAdapter(new r5.o(activity, list, this.i, this.e));
}
private final void U() {
FragmentActivity activity;
Resources resources;
String string;
FragmentActivity activity2;
Resources resources2;
String str = "";
if (!m0.a(getActivity()) ? !((activity = getActivity()) == null || (resources = activity.getResources()) == null || (string = resources.getString(R.string.no_internet_connection)) == null) : !((activity2 = getActivity()) == null || (resources2 = activity2.getResources()) == null || (string = resources2.getString(R.string.sso_generic_error)) == null)) {
str = string;
}
oe0 oe0Var = this.c;
oe0 oe0Var2 = null;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.b.d.setVisibility(8);
oe0 oe0Var3 = this.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var3 = null;
}
oe0Var3.b.e.setText(str);
oe0 oe0Var4 = this.c;
if (oe0Var4 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var4 = null;
}
oe0Var4.b.c.setVisibility(0);
oe0 oe0Var5 = this.c;
if (oe0Var5 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var5 = null;
}
oe0Var5.f.setVisibility(8);
oe0 oe0Var6 = this.c;
if (oe0Var6 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var6 = null;
}
oe0Var6.e.setVisibility(8);
oe0 oe0Var7 = this.c;
if (oe0Var7 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var7 = null;
}
oe0Var7.g.setVisibility(8);
oe0 oe0Var8 = this.c;
if (oe0Var8 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var8 = null;
}
oe0Var8.i.setVisibility(8);
oe0 oe0Var9 = this.c;
if (oe0Var9 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var2 = oe0Var9;
}
oe0Var2.o.setVisibility(8);
}
private final ArrayList<Content> parseDEWidgetData(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;
}
public final void C(AppCompatActivity activity, boolean z) {
kotlin.jvm.internal.m.g(activity, "activity");
this.f = z;
if (z) {
return;
}
this.f = true;
oe0 oe0Var = this.c;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.e(l.x.a());
V(activity);
}
public final List<Section> D(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;
}
public final void G() {
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 {
FragmentActivity activity = getActivity();
kotlin.jvm.internal.m.e(activity, "null cannot be cast to non-null type android.content.Context");
k6.p pVar = new k6.p(activity, this, "");
HashMap hashMap = new HashMap();
hashMap.put("X-Platform", "LM");
hashMap.put("X-OS", "Android");
String b2 = f6.d.b(getActivity());
kotlin.jvm.internal.m.f(b2, "getAndroidID(...)");
hashMap.put("X-Device-Id", b2);
if (f0.G1(getActivity(), "userName") != null) {
str = f0.G1(getActivity(), "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();
ToastHelper.showToast(getActivity(), NetworkHelper.getErrorMessage(getActivity(), e2));
}
}
public final void O(List<Section> list, final AppCompatActivity activity) {
kotlin.jvm.internal.m.g(list, "list");
kotlin.jvm.internal.m.g(activity, "activity");
oe0 oe0Var = null;
if (I(list)) {
MintDataItem mintDataItem = this.i;
if (mintDataItem != null) {
mintDataItem.setCollection(true);
}
o1.a("RFU1 Widget URL", " setAdapterList");
T(D(list));
this.o.postDelayed(new Runnable() {
@Override
public final void run() {
t.P(t.this, activity);
}
}, 500L);
oe0 oe0Var2 = this.c;
if (oe0Var2 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var = oe0Var2;
}
oe0Var.a.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
t.Q(t.this, activity, view);
}
});
return;
}
z7.w wVar = this.d;
if (wVar == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar = null;
}
wVar.i().clear();
MintDataItem mintDataItem2 = this.i;
if (mintDataItem2 != null) {
mintDataItem2.setCollection(false);
}
Y();
FlexboxLayoutManager flexboxLayoutManager = new FlexboxLayoutManager(activity);
flexboxLayoutManager.setFlexDirection(0);
flexboxLayoutManager.setJustifyContent(0);
oe0 oe0Var3 = this.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var3 = null;
}
oe0Var3.i.setLayoutManager(flexboxLayoutManager);
oe0 oe0Var4 = this.c;
if (oe0Var4 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var4 = null;
}
oe0Var4.i.setAdapter(new s5(list, this, false, (RecyclerView) null));
final Config r0 = f0.r0();
oe0 oe0Var5 = this.c;
if (oe0Var5 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var = oe0Var5;
}
oe0Var.o.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
t.R(t.this, r0, activity, view);
}
});
}
@SuppressLint({"ClickableViewAccessibility"})
public final void V(AppCompatActivity activity) {
kotlin.jvm.internal.m.g(activity, "activity");
o1.a("RFU1 Widget URL", "setUpViewModel");
boolean Z1 = f0.Z1();
Config r0 = f0.r0();
kotlin.jvm.internal.m.f(r0, "getConfig(...)");
this.d = new ViewModelProvider(activity, new n2(Z1, r0)).get(z7.w.class);
if (!l.x.b()) {
z7.w wVar = this.d;
z7.w wVar2 = null;
if (wVar == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar = null;
}
if (wVar.e() != null) {
z7.w wVar3 = this.d;
if (wVar3 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
wVar2 = wVar3;
}
if (!wVar2.e().isEmpty()) {
X();
G();
}
}
}
W();
G();
}
public final void W() {
oe0 oe0Var = this.c;
oe0 oe0Var2 = null;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.f.setVisibility(0);
oe0 oe0Var3 = this.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var3 = null;
}
oe0Var3.e.setVisibility(8);
oe0 oe0Var4 = this.c;
if (oe0Var4 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var4 = null;
}
oe0Var4.g.setVisibility(8);
oe0 oe0Var5 = this.c;
if (oe0Var5 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var2 = oe0Var5;
}
oe0Var2.j.setVisibility(8);
}
public final void X() {
oe0 oe0Var = this.c;
oe0 oe0Var2 = null;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.f.setVisibility(8);
oe0 oe0Var3 = this.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var3 = null;
}
oe0Var3.e.setVisibility(0);
oe0 oe0Var4 = this.c;
if (oe0Var4 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var4 = null;
}
oe0Var4.g.setVisibility(0);
oe0 oe0Var5 = this.c;
if (oe0Var5 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var2 = oe0Var5;
}
oe0Var2.j.setVisibility(8);
}
public final void Y() {
oe0 oe0Var = this.c;
oe0 oe0Var2 = null;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.f.setVisibility(8);
oe0 oe0Var3 = this.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var3 = null;
}
oe0Var3.e.setVisibility(8);
oe0 oe0Var4 = this.c;
if (oe0Var4 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var4 = null;
}
oe0Var4.g.setVisibility(8);
oe0 oe0Var5 = this.c;
if (oe0Var5 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var5 = null;
}
oe0Var5.j.setVisibility(0);
oe0 oe0Var6 = this.c;
if (oe0Var6 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var6 = null;
}
oe0Var6.i.setVisibility(0);
oe0 oe0Var7 = this.c;
if (oe0Var7 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var2 = oe0Var7;
}
oe0Var2.o.setVisibility(0);
}
public void getAboutCompanyData(JSONObject response, String urlTag) {
oe0 oe0Var = this.c;
z7.w wVar = null;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.q.setRefreshing(false);
String json = new Gson().toJson(String.valueOf(response));
kotlin.jvm.internal.m.f(json, "toJson(...)");
if (!TextUtils.isEmpty(json) && !kotlin.jvm.internal.m.b(json, "null")) {
z7.w wVar2 = this.d;
if (wVar2 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar2 = null;
}
AppCompatActivity activity = getActivity();
kotlin.jvm.internal.m.e(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
wVar2.n("section", json, activity);
}
z7.w wVar3 = this.d;
if (wVar3 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar3 = null;
}
wVar3.h().clear();
for (Section section : ((SettingPrefMain) new Gson().fromJson(String.valueOf(response), new b().getType())).getSectionPreferences().getSections()) {
z7.w wVar4 = this.d;
if (wVar4 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar4 = null;
}
List h = wVar4.h();
kotlin.jvm.internal.m.d(section);
h.add(section);
if (!section.getSubSections().isEmpty()) {
for (Section section2 : section.getSubSections()) {
z7.w wVar5 = this.d;
if (wVar5 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar5 = null;
}
List h2 = wVar5.h();
kotlin.jvm.internal.m.d(section2);
h2.add(section2);
}
}
}
z7.w wVar6 = this.d;
if (wVar6 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar6 = null;
}
z7.w wVar7 = this.d;
if (wVar7 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar7 = null;
}
List h3 = wVar7.h();
AppCompatActivity activity2 = getActivity();
kotlin.jvm.internal.m.e(activity2, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
wVar6.t(h3, activity2);
z7.w wVar8 = this.d;
if (wVar8 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar8 = null;
}
wVar8.g().setValue(Boolean.TRUE);
o1.a("SettingsPrefViewModel", "inside observer");
z7.w wVar9 = this.d;
if (wVar9 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar9 = null;
}
if (!wVar9.h().isEmpty()) {
z7.w wVar10 = this.d;
if (wVar10 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
wVar = wVar10;
}
List<Section> h7 = wVar.h();
FragmentActivity activity3 = getActivity();
kotlin.jvm.internal.m.e(activity3, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
O(h7, (AppCompatActivity) activity3);
return;
}
z7.w wVar11 = this.d;
if (wVar11 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar11 = null;
}
AppCompatActivity activity4 = getActivity();
kotlin.jvm.internal.m.e(activity4, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
if (!TextUtils.isEmpty(wVar11.l("section", activity4))) {
z7.w wVar12 = this.d;
if (wVar12 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar12 = null;
}
AppCompatActivity activity5 = getActivity();
kotlin.jvm.internal.m.e(activity5, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
if (!kotlin.jvm.internal.m.b(wVar12.l("section", activity5), "null\n")) {
z7.w wVar13 = this.d;
if (wVar13 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar13 = null;
}
AppCompatActivity activity6 = getActivity();
kotlin.jvm.internal.m.e(activity6, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
String l = wVar13.l("section", activity6);
z7.w wVar14 = this.d;
if (wVar14 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar14 = null;
}
wVar14.p(l);
z7.w wVar15 = this.d;
if (wVar15 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
wVar = wVar15;
}
List<Section> h8 = wVar.h();
FragmentActivity activity7 = getActivity();
kotlin.jvm.internal.m.e(activity7, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
O(h8, (AppCompatActivity) activity7);
return;
}
}
z7.w wVar16 = this.d;
if (wVar16 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar16 = null;
}
AppCompatActivity activity8 = getActivity();
kotlin.jvm.internal.m.e(activity8, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
if (TextUtils.isEmpty(wVar16.m(activity8))) {
z7.w wVar17 = this.c;
if (wVar17 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
wVar = wVar17;
}
wVar.i.setVisibility(8);
U();
return;
}
z7.w wVar18 = this.d;
if (wVar18 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar18 = null;
}
AppCompatActivity activity9 = getActivity();
kotlin.jvm.internal.m.e(activity9, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
String m = wVar18.m(activity9);
z7.w wVar19 = this.d;
if (wVar19 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar19 = null;
}
wVar19.p(m);
z7.w wVar20 = this.d;
if (wVar20 == null) {
kotlin.jvm.internal.m.w("mViewModel");
} else {
wVar = wVar20;
}
List<Section> h9 = wVar.h();
FragmentActivity activity10 = getActivity();
kotlin.jvm.internal.m.e(activity10, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
O(h9, (AppCompatActivity) activity10);
}
public void getStoryData(JSONObject jsonObject) {
X();
if (jsonObject == null) {
S(getActivity(), new ArrayList<>(), l.x.a(), "adapter_tab_my_feed", this.e, this.i);
return;
}
ArrayList<Content> parseDEWidgetData = parseDEWidgetData(jsonObject);
if (parseDEWidgetData == null || parseDEWidgetData.isEmpty()) {
S(getActivity(), new ArrayList<>(), l.x.a(), "adapter_tab_my_feed", this.e, this.i);
} else {
S(getActivity(), parseDEWidgetData, l.x.a(), "adapter_tab_my_feed", this.e, this.i);
}
}
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Bundle arguments = getArguments();
oe0 oe0Var = null;
String string = arguments != null ? arguments.getString("tab_name", "") : null;
this.e = string != null ? string : "";
FragmentActivity activity = getActivity();
kotlin.jvm.internal.m.e(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
C((AppCompatActivity) activity, false);
oe0 oe0Var2 = this.c;
if (oe0Var2 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var2 = null;
}
oe0Var2.b.a.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
t.J(t.this, view);
}
});
oe0 oe0Var3 = this.c;
if (oe0Var3 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var3 = null;
}
oe0Var3.f(this.i);
oe0 oe0Var4 = this.c;
if (oe0Var4 == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var4 = null;
}
oe0Var4.q.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
public final void onRefresh() {
t.K(t.this);
}
});
oe0 oe0Var5 = this.c;
if (oe0Var5 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var = oe0Var5;
}
oe0Var.i.addOnScrollListener(new c());
}
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
kotlin.jvm.internal.m.g(inflater, "inflater");
oe0 c2 = oe0.c(inflater, container, false);
kotlin.jvm.internal.m.f(c2, "inflate(...)");
this.c = c2;
oe0 oe0Var = null;
if (c2 == null) {
kotlin.jvm.internal.m.w("binding");
c2 = null;
}
c2.e(l.x.a());
Bundle arguments = getArguments();
String string = arguments != null ? arguments.getString("tab_url", "") : null;
this.g = string != null ? string : "";
MintDataItem mintDataItem = this.i;
if ((mintDataItem != null ? mintDataItem.getTabMaxLimit() : null) != null) {
MintDataItem mintDataItem2 = this.i;
Integer tabMaxLimit = mintDataItem2 != null ? mintDataItem2.getTabMaxLimit() : null;
kotlin.jvm.internal.m.d(tabMaxLimit);
this.h = tabMaxLimit.intValue();
}
oe0 oe0Var2 = this.c;
if (oe0Var2 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var = oe0Var2;
}
View root = oe0Var.getRoot();
kotlin.jvm.internal.m.f(root, "getRoot(...)");
return root;
}
public void onError(String message) {
}
public void onError(String message, String url) {
oe0 oe0Var = this.c;
if (oe0Var == null) {
kotlin.jvm.internal.m.w("binding");
oe0Var = null;
}
oe0Var.q.setRefreshing(false);
U();
}
public void onResume() {
super.onResume();
this.f = false;
if (q) {
this.o.postDelayed(new Runnable() {
@Override
public final void run() {
t.L(t.this);
}
}, 500L);
q = false;
}
}
@SuppressLint({"NotifyDataSetChanged"})
public void onToogleClicked(Section section, int position) {
kotlin.jvm.internal.m.g(section, "section");
section.setSelected(!section.isSelected());
z7.w wVar = this.d;
oe0 oe0Var = null;
if (wVar == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar = null;
}
wVar.h().set(position, section);
SectionPref sectionPref = new SectionPref(section.getId(), section.isSelected());
if (section.isSelected()) {
z7.w wVar2 = this.d;
if (wVar2 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar2 = null;
}
wVar2.j().add(section.getName());
}
z7.w wVar3 = this.d;
if (wVar3 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar3 = null;
}
if (wVar3.i().containsKey(Long.valueOf(section.getId()))) {
z7.w wVar4 = this.d;
if (wVar4 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar4 = null;
}
wVar4.i().remove(Long.valueOf(section.getId()));
z7.w wVar5 = this.d;
if (wVar5 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar5 = null;
}
wVar5.d().remove(section.getName());
} else {
z7.w wVar6 = this.d;
if (wVar6 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar6 = null;
}
wVar6.d().add(section.getName());
z7.w wVar7 = this.d;
if (wVar7 == null) {
kotlin.jvm.internal.m.w("mViewModel");
wVar7 = null;
}
wVar7.i().put(Long.valueOf(section.getId()), sectionPref);
}
oe0 oe0Var2 = this.c;
if (oe0Var2 == null) {
kotlin.jvm.internal.m.w("binding");
} else {
oe0Var = oe0Var2;
}
RecyclerView.Adapter adapter = oe0Var.i.getAdapter();
if (adapter != null) {
adapter.notifyDataSetChanged();
}
}
}