得物.apk(点击下载) / AttentionFlowFragment.java
package com.shizhuang.duapp.modules.community.attention.fragment;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Lifecycle;
import androidx.recyclerview.widget.RecyclerView;
import bu0.w;
import cd.l;
import cd.s;
import com.alibaba.android.vlayout.Cantor;
import com.alibaba.android.vlayout.VirtualLayoutManager;
import com.knightboost.observability.extension.pagestartup.PageStartupTraceManager;
import com.knightboost.observability.extension.pagestartup.PageStartupTracer;
import com.knightboost.observability.extension.pagestartup.annotation.StartupTracePage;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.event.SCEvent;
import com.shizhuang.duapp.common.event.TeensModeChangeEvent;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.exposure.DuPartialItemExposureHelper;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.extension.ViewModelLifecycleAwareLazy;
import com.shizhuang.duapp.common.helper.loadmore.LoadMoreHelper;
import com.shizhuang.duapp.common.recyclerview.adapter.DuDelegateAdapter;
import com.shizhuang.duapp.common.ui.BaseFragment;
import com.shizhuang.duapp.libs.smartlayout.DuSmartLayout;
import com.shizhuang.duapp.modules.community.attention.adapter.AttentionJoinCircleAdapter;
import com.shizhuang.duapp.modules.community.attention.adapter.AttentionLiveUsersAdapter;
import com.shizhuang.duapp.modules.community.attention.adapter.AttentionTrendAdapter;
import com.shizhuang.duapp.modules.community.attention.adapter.AttentionVisitorHeaderAdapter;
import com.shizhuang.duapp.modules.community.attention.event.FavoriteUserEvent;
import com.shizhuang.duapp.modules.community.attention.helper.AttentionScrollMonitor;
import com.shizhuang.duapp.modules.community.attention.helper.AttentionScrollMonitor$collectScrollInfo$1;
import com.shizhuang.duapp.modules.community.attention.helper.AttentionScrollMonitor$monitorItemExpand$1;
import com.shizhuang.duapp.modules.community.attention.helper.AttentionScrollMonitor$monitorMachineRecorder$1;
import com.shizhuang.duapp.modules.community.attention.helper.AttentionScrollMonitor$monitorMachineRecorder$antiMachineRecorder$1$1;
import com.shizhuang.duapp.modules.community.attention.helper.AttentionScrollMonitor$startMonitorVideo$1;
import com.shizhuang.duapp.modules.community.attention.helper.AttentionScrollMonitor$startMonitorVideo$2;
import com.shizhuang.duapp.modules.community.attention.helper.PublishEventHandler;
import com.shizhuang.duapp.modules.community.attention.helper.PublishEventHandler$addPublishCircleInfoFailView$$inlined$apply$lambda$1;
import com.shizhuang.duapp.modules.community.attention.helper.PublishEventHandler$addPublishCircleInfoFailView$$inlined$apply$lambda$2;
import com.shizhuang.duapp.modules.community.attention.model.ExposureExtraModel;
import com.shizhuang.duapp.modules.community.attention.model.VisitorAction;
import com.shizhuang.duapp.modules.community.attention.view.TrendPublishTaskView;
import com.shizhuang.duapp.modules.community.attention.viewmodel.AttentionListViewModel;
import com.shizhuang.duapp.modules.community.home.HomeTrendHelper;
import com.shizhuang.duapp.modules.community.home.fragment.TrendViewModel;
import com.shizhuang.duapp.modules.community.home.viewmodel.HomeTrendViewModel;
import com.shizhuang.duapp.modules.du_community_common.apm.PageLoadLogger;
import com.shizhuang.duapp.modules.du_community_common.decoration.LinearVerticalDecoration;
import com.shizhuang.duapp.modules.du_community_common.events.AttentionUserEvent;
import com.shizhuang.duapp.modules.du_community_common.events.EditTrendEvent;
import com.shizhuang.duapp.modules.du_community_common.facade.request.DuHttpRequest;
import com.shizhuang.duapp.modules.du_community_common.helper.CommunityCommonDelegate;
import com.shizhuang.duapp.modules.du_community_common.interfaces.ITrendFragment;
import com.shizhuang.duapp.modules.du_community_common.manager.UploadProgressManager;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityFeedModel;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityListItemModel;
import com.shizhuang.duapp.modules.du_community_common.model.CommunityListModel;
import com.shizhuang.duapp.modules.du_community_common.model.MediaItemModel;
import com.shizhuang.duapp.modules.du_community_common.model.trend.AttentionLiveListItemModel;
import com.shizhuang.duapp.modules.du_community_common.model.trend.JoinCircleModel;
import com.shizhuang.duapp.modules.du_community_common.model.user.InterestedUsersModel;
import com.shizhuang.duapp.modules.du_community_common.sensor.SensorCommunityChannel;
import com.shizhuang.duapp.modules.du_community_common.util.FieldTransmissionUtils;
import com.shizhuang.duapp.modules.du_community_common.viewmodel.ActionTypeViewModel;
import com.shizhuang.duapp.modules.du_community_common.viewmodel.DoubleClickViewModel;
import com.shizhuang.duapp.modules.pay.R$styleable;
import com.shizhuang.duapp.modules.router.ServiceManager;
import com.shizhuang.duapp.preloader.ListUrlLoader;
import com.shizhuang.model.event.MessageEvent;
import com.shizhuang.model.event.NewAttentionTrendEvent;
import com.shizhuang.model.event.NewLiveEvent;
import com.shizhuang.model.event.ShowDewuTabRedDotEvent;
import com.shizhuang.model.trend.CircleModel;
import com.shizhuang.model.trend.TrendUploadViewModel;
import df.k0;
import df.p0;
import df.r0;
import fd.q;
import fd.x0;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.Metadata;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
import kotlin.ranges.RangesKt___RangesKt;
import mn.a;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import te1.b;
import v20.i;
import v20.j;
import y20.g;
import zc.f;
@StartupTracePage(traceRealUserExperience = true)
@Metadata(bv = {}, d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\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\u0005\b\u0017\u0018\u00002\u00020\u00012\u00020\u0002:\u0001\u0017B\u0007¢\u0006\u0004\b\u0015\u0010\u0016J\b\u0010\u0004\u001a\u00020\u0003H\u0016J\b\u0010\u0005\u001a\u00020\u0003H\u0016J\u0010\u0010\b\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\u0006H\u0017J\u0010\u0010\b\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\tH\u0007J\u0012\u0010\f\u001a\u00020\u00032\b\u0010\u000b\u001a\u0004\u0018\u00010\nH\u0007J\u0010\u0010\u000e\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\rH\u0007J\u0010\u0010\u0010\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\u000fH\u0007J\u0010\u0010\u0012\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\u0011H\u0007J\u0010\u0010\u0014\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\u0013H\u0007¨\u0006\u0018"}, d2 = {"Lcom/shizhuang/duapp/modules/community/attention/fragment/AttentionFlowFragment;", "Lcom/shizhuang/duapp/common/ui/BaseFragment;", "Lcom/shizhuang/duapp/modules/du_community_common/interfaces/ITrendFragment;", "", "onResume", "onPause", "Lcom/shizhuang/duapp/common/event/SCEvent;", "event", "onEvent", "Lr20/a;", "Lcom/shizhuang/duapp/modules/du_community_common/events/AttentionUserEvent;", "attentionUserEvent", "attentionUser", "Lzc/f;", "notifyLoginEvent", "Lzc/e;", "refreshListFromDetail", "Lr20/b;", "onCircleJoinStateEvent", "Lcom/shizhuang/duapp/modules/du_community_common/events/EditTrendEvent;", "editRefreshEvent", "<init>", "()V", "b", "du_trend_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: AttentionFlowFragment.kt */
public class AttentionFlowFragment extends BaseFragment implements ITrendFragment {
public static final int L = ((int) Cantor.getCantor((long) R$styleable.AppCompatTheme_textAppearanceListItem, 3));
public static final int M = ((int) Cantor.getCantor((long) R$styleable.AppCompatTheme_textAppearanceListItemSecondary, 3));
public static final int N = ((int) Cantor.getCantor((long) R$styleable.AppCompatTheme_textAppearanceListItemSmall, 3));
public static final int O = ((int) Cantor.getCantor((long) R$styleable.AppCompatTheme_textAppearancePopupMenuHeader, 3));
public static final int P = ((int) Cantor.getCantor((long) 105, 3));
public static final int Q = ((int) Cantor.getCantor((long) R$styleable.AppCompatTheme_textAppearanceSearchResultTitle, 3));
public static final int R = ((int) Cantor.getCantor((long) 81, 3));
public static final int S = ((int) Cantor.getCantor((long) 84, 3));
@NotNull
public static final b T = new b(null);
public static ChangeQuickRedirect changeQuickRedirect;
public AnimatorSet A;
public Disposable B;
public boolean C;
public boolean D;
public Disposable E;
public Disposable F;
@NotNull
public RecyclerView.RecycledViewPool G;
public final Lazy H;
public int I;
public final PageLoadLogger J;
public HashMap K;
public final Lazy b = new ViewModelLifecycleAwareLazy(this, new AttentionFlowFragment$$special$$inlined$duViewModel$1(this));
/* renamed from: c reason: collision with root package name */
public final Lazy f11558c = new ViewModelLifecycleAwareLazy(this, new AttentionFlowFragment$$special$$inlined$duParentFragmentViewModel$1(this));
public final Lazy d = new ViewModelLifecycleAwareLazy(this, new AttentionFlowFragment$$special$$inlined$duParentFragmentViewModel$2(this));
public final Lazy e = new ViewModelLifecycleAwareLazy(this, new AttentionFlowFragment$$special$$inlined$duViewModel$2(this));
public final Lazy f;
/* renamed from: g reason: collision with root package name */
public final Lazy f11559g;
/* renamed from: h reason: collision with root package name */
public final AttentionVisitorHeaderAdapter f11560h;
public final AttentionJoinCircleAdapter i;
public final AttentionLiveUsersAdapter j;
public final VisitorAction k;
public final ExposureExtraModel l;
@NotNull
public final Lazy m;
public final Lazy n;
public LoadMoreHelper o;
public final DuExposureHelper p;
/* renamed from: q reason: collision with root package name */
public final DuPartialItemExposureHelper f11561q;
public AttentionScrollMonitor r;
public PublishEventHandler s;
public int t;
/* renamed from: u reason: collision with root package name */
public int f11562u;
/* renamed from: v reason: collision with root package name */
public CommunityListModel f11563v;
public boolean w;
public boolean x;
public boolean y;
public boolean z;
public class _boostWeave {
public static ChangeQuickRedirect changeQuickRedirect;
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreate")
@Keep
public static void FragmentMethodWeaver_onCreate(AttentionFlowFragment attentionFlowFragment, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{attentionFlowFragment, bundle}, null, changeQuickRedirect, true, 77724, new Class[]{AttentionFlowFragment.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
AttentionFlowFragment.d(attentionFlowFragment, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (attentionFlowFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.community.attention.fragment.AttentionFlowFragment")) {
jn.b.f34396a.fragmentOnCreateMethod(attentionFlowFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onCreateView")
@Keep
public static View FragmentMethodWeaver_onCreateView(@NonNull AttentionFlowFragment attentionFlowFragment, @Nullable LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{attentionFlowFragment, layoutInflater, viewGroup, bundle}, null, changeQuickRedirect, true, 77726, new Class[]{AttentionFlowFragment.class, LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
long currentTimeMillis = System.currentTimeMillis();
View f = AttentionFlowFragment.f(attentionFlowFragment, layoutInflater, viewGroup, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (attentionFlowFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.community.attention.fragment.AttentionFlowFragment")) {
jn.b.f34396a.fragmentOnCreateViewMethod(attentionFlowFragment, currentTimeMillis, currentTimeMillis2);
}
return f;
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onResume")
@Keep
public static void FragmentMethodWeaver_onResume(AttentionFlowFragment attentionFlowFragment) {
if (!PatchProxy.proxy(new Object[]{attentionFlowFragment}, null, changeQuickRedirect, true, 77723, new Class[]{AttentionFlowFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
AttentionFlowFragment.c(attentionFlowFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (attentionFlowFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.community.attention.fragment.AttentionFlowFragment")) {
jn.b.f34396a.fragmentOnResumeMethod(attentionFlowFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onStart")
@Keep
public static void FragmentMethodWeaver_onStart(AttentionFlowFragment attentionFlowFragment) {
if (!PatchProxy.proxy(new Object[]{attentionFlowFragment}, null, changeQuickRedirect, true, 77725, new Class[]{AttentionFlowFragment.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
AttentionFlowFragment.e(attentionFlowFragment);
long currentTimeMillis2 = System.currentTimeMillis();
if (attentionFlowFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.community.attention.fragment.AttentionFlowFragment")) {
jn.b.f34396a.fragmentOnStartMethod(attentionFlowFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
@TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.fragment.app.Fragment")
@Insert(mayCreateSuper = true, value = "onViewCreated")
@Keep
public static void FragmentMethodWeaver_onViewCreated(@NonNull AttentionFlowFragment attentionFlowFragment, @Nullable View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{attentionFlowFragment, view, bundle}, null, changeQuickRedirect, true, 77727, new Class[]{AttentionFlowFragment.class, View.class, Bundle.class}, Void.TYPE).isSupported) {
long currentTimeMillis = System.currentTimeMillis();
AttentionFlowFragment.g(attentionFlowFragment, view, bundle);
long currentTimeMillis2 = System.currentTimeMillis();
if (attentionFlowFragment.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.community.attention.fragment.AttentionFlowFragment")) {
jn.b.f34396a.fragmentOnViewCreatedMethod(attentionFlowFragment, currentTimeMillis, currentTimeMillis2);
}
}
}
}
/* compiled from: AttentionFlowFragment.kt */
public static final class a implements PageLoadLogger.PageLoadCallback {
public static ChangeQuickRedirect changeQuickRedirect;
/* renamed from: a reason: collision with root package name */
public final /* synthetic */ AttentionFlowFragment f11565a;
public a(AttentionFlowFragment attentionFlowFragment) {
this.f11565a = attentionFlowFragment;
}
@Override // com.shizhuang.duapp.modules.du_community_common.apm.PageLoadLogger.PageLoadCallback
public final void onPageLoaded(@NotNull PageLoadLogger.a aVar) {
PageStartupTracer c5;
if (!PatchProxy.proxy(new Object[]{aVar}, this, changeQuickRedirect, false, 77708, new Class[]{PageLoadLogger.a.class}, Void.TYPE).isSupported && (c5 = PageStartupTraceManager.f5275a.c(this.f11565a)) != null) {
c5.setTag("section", "attention_flow_load");
c5.setTag("isDataCache", aVar.d());
c5.setMetric("prepareDuration", Long.valueOf(aVar.b()));
c5.setMetric("requestDuration", Long.valueOf(aVar.c()));
c5.setMetric("layoutDuration", Long.valueOf(aVar.a()));
c5.endStartupOfUserExperience();
}
}
}
/* compiled from: AttentionFlowFragment.kt */
public static final class b {
public static ChangeQuickRedirect changeQuickRedirect;
public b(DefaultConstructorMarker defaultConstructorMarker) {
}
public final int a() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77718, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : AttentionFlowFragment.P;
}
public final int b() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77717, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : AttentionFlowFragment.O;
}
public final int c() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77716, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : AttentionFlowFragment.N;
}
public final int d() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77715, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : AttentionFlowFragment.M;
}
public final int e() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77720, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : AttentionFlowFragment.R;
}
public final int f() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77721, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : AttentionFlowFragment.S;
}
@NotNull
public final AttentionFlowFragment g(boolean z) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Byte(z ? (byte) 1 : 0)}, this, changeQuickRedirect, false, 77722, new Class[]{Boolean.TYPE}, AttentionFlowFragment.class);
if (proxy.isSupported) {
return (AttentionFlowFragment) proxy.result;
}
AttentionFlowFragment attentionFlowFragment = new AttentionFlowFragment();
Bundle bundle = new Bundle();
bundle.putBoolean("isOld", z);
attentionFlowFragment.setArguments(bundle);
return attentionFlowFragment;
}
}
/* compiled from: AttentionFlowFragment.kt */
public static final class c<T> implements Consumer<CommunityListModel> {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ AttentionFlowFragment b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ boolean f11566c;
public c(AttentionFlowFragment attentionFlowFragment, boolean z) {
this.b = attentionFlowFragment;
this.f11566c = z;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // io.reactivex.functions.Consumer
public void accept(CommunityListModel communityListModel) {
CommunityListModel communityListModel2 = communityListModel;
boolean z = true;
if (!PatchProxy.proxy(new Object[]{communityListModel2}, this, changeQuickRedirect, false, 77729, new Class[]{CommunityListModel.class}, Void.TYPE).isSupported) {
g.f40168a.h(this.b.getContext(), communityListModel2.getContentCacheBeanList());
AttentionListViewModel l = this.b.l();
String lastId = communityListModel2.getLastId();
if (lastId == null) {
lastId = "";
}
l.setLastId(lastId);
JoinCircleModel joinCircleModel = communityListModel2.getJoinCircleModel();
if (this.f11566c) {
this.b.q(joinCircleModel);
}
ArrayList<CommunityListItemModel> safeList = communityListModel2.getSafeList();
if (safeList != null && !safeList.isEmpty()) {
z = false;
}
if (!z) {
this.b.o(this.f11566c, communityListModel2, false);
} else if (this.f11566c) {
this.b.t();
}
}
}
}
/* compiled from: AttentionFlowFragment.kt */
public static final class d<T> implements Consumer<Throwable> {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ AttentionFlowFragment b;
public d(AttentionFlowFragment attentionFlowFragment) {
this.b = attentionFlowFragment;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // io.reactivex.functions.Consumer
public void accept(Throwable th2) {
if (!PatchProxy.proxy(new Object[]{th2}, this, changeQuickRedirect, false, 77730, new Class[]{Throwable.class}, Void.TYPE).isSupported) {
this.b.t();
}
}
}
/* compiled from: AttentionFlowFragment.kt */
public static final class e implements Runnable {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ AttentionFlowFragment b;
/* renamed from: c reason: collision with root package name */
public final /* synthetic */ CommunityListItemModel f11567c;
public final /* synthetic */ CommunityListModel d;
public e(AttentionFlowFragment attentionFlowFragment, CommunityListItemModel communityListItemModel, CommunityListModel communityListModel) {
this.b = attentionFlowFragment;
this.f11567c = communityListItemModel;
this.d = communityListModel;
}
public final void run() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77731, new Class[0], Void.TYPE).isSupported) {
this.b.j().insertItem(0, this.f11567c);
this.b.j().notifyItemRangeChanged(1, this.d.getSafeList().size());
RecyclerView recyclerView = (RecyclerView) this.b._$_findCachedViewById(R.id.recyclerView);
if (recyclerView != null) {
recyclerView.scrollToPosition(0);
}
}
}
}
public AttentionFlowFragment() {
int i3;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.NONE;
this.f = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, (Function0) new AttentionFlowFragment$virtualLayoutManager$2(this));
this.f11559g = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, (Function0) new AttentionFlowFragment$delegateAdapter$2(this));
this.f11560h = new AttentionVisitorHeaderAdapter();
AttentionJoinCircleAdapter attentionJoinCircleAdapter = new AttentionJoinCircleAdapter();
attentionJoinCircleAdapter.setOnItemClickListener(new AttentionFlowFragment$$special$$inlined$apply$lambda$1(this));
Unit unit = Unit.INSTANCE;
this.i = attentionJoinCircleAdapter;
this.j = new AttentionLiveUsersAdapter(this);
this.k = new VisitorAction(0, null, 0, null, 0, 31, null);
this.l = new ExposureExtraModel(0, false, false, 7, null);
this.m = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, (Function0) new AttentionFlowFragment$listAdapter$2(this));
this.n = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, (Function0) new AttentionFlowFragment$verticalDecoration$2(this));
DuExposureHelper duExposureHelper = new DuExposureHelper(this, null, false, 6);
if (!PatchProxy.proxy(new Object[]{new Byte((byte) 1)}, duExposureHelper, DuExposureHelper.changeQuickRedirect, false, 3516, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
duExposureHelper.p = true;
}
this.p = duExposureHelper;
this.f11561q = new DuPartialItemExposureHelper(this, null, 2);
this.t = 1;
this.x = true;
this.G = new RecyclerView.RecycledViewPool();
this.H = new ViewModelLifecycleAwareLazy(this, new AttentionFlowFragment$$special$$inlined$duActivityViewModel$1(this));
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], n20.a.b, n20.a.changeQuickRedirect, false, 98804, new Class[0], Integer.TYPE);
if (proxy.isSupported) {
i3 = ((Integer) proxy.result).intValue();
} else {
i3 = fd.c.d("attention_flow_lazy_load", 0);
}
this.I = i3;
PageLoadLogger pageLoadLogger = new PageLoadLogger(this);
pageLoadLogger.d(new a(this));
this.J = pageLoadLogger;
}
public static void c(AttentionFlowFragment attentionFlowFragment) {
boolean z4;
boolean z5;
if (!PatchProxy.proxy(new Object[0], attentionFlowFragment, changeQuickRedirect, false, 77682, new Class[0], Void.TYPE).isSupported) {
super.onResume();
FieldTransmissionUtils.f12956a.h(attentionFlowFragment.getContext(), AttentionFlowFragment$onResume$1.INSTANCE);
boolean z12 = true;
r0.s(attentionFlowFragment.getActivity(), true);
r0.n(attentionFlowFragment.getActivity(), 0);
r0.B(attentionFlowFragment.getActivity());
if (!PatchProxy.proxy(new Object[0], attentionFlowFragment, changeQuickRedirect, false, 77683, new Class[0], Void.TYPE).isSupported && !attentionFlowFragment.y) {
if (!PatchProxy.proxy(new Object[0], attentionFlowFragment, changeQuickRedirect, false, 77662, new Class[0], Void.TYPE).isSupported) {
b30.c.b.a("attention_cache_feed_id", attentionFlowFragment).f((RecyclerView) attentionFlowFragment._$_findCachedViewById(R.id.recyclerView), TuplesKt.to(Integer.valueOf((int) R.layout.du_community_common_view_reply_item), 30), TuplesKt.to(Integer.valueOf((int) R.layout.du_trend_item_trend_product), 30)).l();
attentionFlowFragment.F = CommunityCommonDelegate.f12815a.c((RecyclerView) attentionFlowFragment._$_findCachedViewById(R.id.recyclerView), attentionFlowFragment.j(), 4, attentionFlowFragment.G, L, M, N, O, P, Q, R, S);
}
if (!attentionFlowFragment.z) {
((DuSmartLayout) attentionFlowFragment._$_findCachedViewById(R.id.refreshLayout)).autoRefresh();
}
}
attentionFlowFragment.y = true;
if (!PatchProxy.proxy(new Object[0], attentionFlowFragment, changeQuickRedirect, false, 77684, new Class[0], Void.TYPE).isSupported) {
Integer num = null;
if (!attentionFlowFragment.isLoginStatusChanged()) {
HomeTrendHelper homeTrendHelper = HomeTrendHelper.d;
Class cls = Boolean.TYPE;
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{attentionFlowFragment}, homeTrendHelper, HomeTrendHelper.changeQuickRedirect, false, 79494, new Class[]{Fragment.class}, cls);
if (proxy.isSupported) {
z4 = ((Boolean) proxy.result).booleanValue();
} else if (!l.c(attentionFlowFragment)) {
z4 = false;
} else {
z4 = ((HomeTrendViewModel) s.a(attentionFlowFragment, HomeTrendViewModel.class, null, null, 12)).getHasNewTrend();
}
if (!z4 && !attentionFlowFragment.D) {
PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], homeTrendHelper, HomeTrendHelper.changeQuickRedirect, false, 79487, new Class[0], cls);
if (proxy2.isSupported) {
z5 = ((Boolean) proxy2.result).booleanValue();
} else {
String str = HomeTrendHelper.b;
z5 = !(str == null || str.length() == 0) && !HomeTrendHelper.f11701c;
}
if (!z5) {
z12 = false;
}
}
}
if (z12) {
attentionFlowFragment.D = false;
attentionFlowFragment.doRefresh(2);
}
l30.b bVar = l30.b.f34999a;
ArrayMap arrayMap = new ArrayMap(8);
arrayMap.put("current_page", "89");
arrayMap.put("community_channel_id", SensorCommunityChannel.ATTENTION.getId());
int i3 = HomeTrendHelper.f11700a;
if (i3 > 0) {
num = Integer.valueOf(i3);
}
p0.a(arrayMap, PushConstants.PUSH_TYPE, num);
bVar.b("community_pageview", arrayMap);
}
if (attentionFlowFragment.isLoginStatusChanged() || !attentionFlowFragment.isLogin()) {
AttentionScrollMonitor attentionScrollMonitor = attentionFlowFragment.r;
if (attentionScrollMonitor == null) {
Intrinsics.throwUninitializedPropertyAccessException("scrollMonitor");
}
attentionScrollMonitor.b(attentionFlowFragment);
}
}
}
public static void d(AttentionFlowFragment attentionFlowFragment, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, attentionFlowFragment, changeQuickRedirect, false, 77700, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
super.onCreate(bundle);
}
}
public static void e(AttentionFlowFragment attentionFlowFragment) {
if (!PatchProxy.proxy(new Object[0], attentionFlowFragment, changeQuickRedirect, false, 77702, new Class[0], Void.TYPE).isSupported) {
super.onStart();
}
}
public static View f(AttentionFlowFragment attentionFlowFragment, LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, attentionFlowFragment, changeQuickRedirect, false, 77704, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : super.onCreateView(layoutInflater, viewGroup, bundle);
}
public static void g(AttentionFlowFragment attentionFlowFragment, View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, attentionFlowFragment, changeQuickRedirect, false, 77706, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
super.onViewCreated(view, bundle);
}
}
public View _$_findCachedViewById(int i3) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 77697, new Class[]{Integer.TYPE}, View.class);
if (proxy.isSupported) {
return (View) proxy.result;
}
if (this.K == null) {
this.K = new HashMap();
}
View view = (View) this.K.get(Integer.valueOf(i3));
if (view != null) {
return view;
}
View view2 = getView();
if (view2 == null) {
return null;
}
View findViewById = view2.findViewById(i3);
this.K.put(Integer.valueOf(i3), findViewById);
return findViewById;
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void attentionUser(@org.jetbrains.annotations.Nullable AttentionUserEvent attentionUserEvent) {
ArrayList<InterestedUsersModel> userRecommends;
if (!PatchProxy.proxy(new Object[]{attentionUserEvent}, this, changeQuickRedirect, false, 77691, new Class[]{AttentionUserEvent.class}, Void.TYPE).isSupported) {
ty.a aVar = ty.a.f38713a;
AttentionTrendAdapter j12 = j();
if (!PatchProxy.proxy(new Object[]{j12, attentionUserEvent}, aVar, ty.a.changeQuickRedirect, false, 77976, new Class[]{AttentionTrendAdapter.class, AttentionUserEvent.class}, Void.TYPE).isSupported && attentionUserEvent != null && attentionUserEvent.getType() == 1) {
CommunityListItemModel communityListItemModel = null;
ArrayList list = j12.getList();
int size = list.size();
int i3 = 0;
while (true) {
if (i3 >= size) {
break;
}
CommunityListItemModel communityListItemModel2 = (CommunityListItemModel) list.get(i3);
if (communityListItemModel2 != null && communityListItemModel2.getFeedType() == 9) {
communityListItemModel = communityListItemModel2;
break;
}
i3++;
}
if (!(communityListItemModel == null || (userRecommends = communityListItemModel.getUserRecommends()) == null || userRecommends.isEmpty())) {
int size2 = attentionUserEvent.userIds.size();
for (int i12 = 0; i12 < size2; i12++) {
String str = attentionUserEvent.userIds.get(i12);
Iterator<InterestedUsersModel> it2 = userRecommends.iterator();
while (it2.hasNext()) {
if (Intrinsics.areEqual(it2.next().getSafeUserInfo().userId, str)) {
it2.remove();
}
}
}
if (ei.a.c(communityListItemModel.getUserRecommends())) {
list.remove(communityListItemModel);
j12.notifyDataSetChanged();
return;
}
int indexOf = j12.getList().indexOf(communityListItemModel);
if (indexOf >= 0) {
j12.notifyItemChanged(indexOf);
}
}
}
}
}
@Override // com.shizhuang.duapp.modules.du_community_common.interfaces.ITrendFragment
public void doRefresh(int i3) {
if (!PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 77666, new Class[]{Integer.TYPE}, Void.TYPE).isSupported && ((RecyclerView) _$_findCachedViewById(R.id.recyclerView)) != null && ((DuSmartLayout) _$_findCachedViewById(R.id.refreshLayout)) != null) {
((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).scrollToPosition(0);
((DuSmartLayout) _$_findCachedViewById(R.id.refreshLayout)).autoRefresh();
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void editRefreshEvent(@NotNull EditTrendEvent editTrendEvent) {
CommunityFeedModel communityFeedModel;
if (!PatchProxy.proxy(new Object[]{editTrendEvent}, this, changeQuickRedirect, false, 77696, new Class[]{EditTrendEvent.class}, Void.TYPE).isSupported && (communityFeedModel = editTrendEvent.trendModel) != null && !j().getList().isEmpty()) {
int size = j().getList().size();
for (int i3 = 0; i3 < size; i3++) {
CommunityFeedModel feed = ((CommunityListItemModel) j().getList().get(i3)).getFeed();
if (feed != null && Intrinsics.areEqual(feed.getContent().getContentId(), communityFeedModel.getContent().getContentId())) {
CommunityFeedModel feed2 = ((CommunityListItemModel) j().getList().get(i3)).getFeed();
if (feed2 != null) {
feed2.setContent(communityFeedModel.getContent());
}
g gVar = g.f40168a;
gVar.f(getContext(), gVar.d(getContext(), communityFeedModel));
j().notifyItemChanged(i3);
return;
}
}
}
}
/* JADX DEBUG: Multi-variable search result rejected for r31v0, resolved type: boolean */
/* JADX WARN: Multi-variable type inference failed */
public final void fetchData(boolean z4) {
int i3;
String str;
ExposureExtraModel exposureExtraModel;
Object[] objArr = {new Byte(z4 ? (byte) 1 : 0)};
ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
Class cls = Boolean.TYPE;
if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 77667, new Class[]{cls}, Void.TYPE).isSupported) {
this.x = z4;
AttentionScrollMonitor attentionScrollMonitor = this.r;
if (attentionScrollMonitor == null) {
Intrinsics.throwUninitializedPropertyAccessException("scrollMonitor");
}
if (!PatchProxy.proxy(new Object[]{new Byte((byte) z4)}, attentionScrollMonitor, AttentionScrollMonitor.changeQuickRedirect, false, 77806, new Class[]{cls}, Void.TYPE).isSupported && (exposureExtraModel = attentionScrollMonitor.b) != null) {
exposureExtraModel.isBack = 0;
if (z4 != 0) {
exposureExtraModel.isScrollUp1 = false;
exposureExtraModel.isScrollUp2 = false;
}
}
String str2 = "";
if (z4 != 0) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{this}, HomeTrendHelper.d, HomeTrendHelper.changeQuickRedirect, false, 79493, new Class[]{Fragment.class}, String.class);
if (proxy.isSupported) {
str2 = (String) proxy.result;
} else if (l.c(this)) {
str2 = ((HomeTrendViewModel) s.a(this, HomeTrendViewModel.class, null, null, 12)).getMaxId();
}
}
if (z4 != 0 && HomeTrendHelper.f11701c) {
HomeTrendHelper.b = null;
HomeTrendHelper.f11700a = 0;
}
AttentionListViewModel l12 = l();
Context context = getContext();
int contentType = this.k.getContentType();
String contentUnionId = this.k.getContentUnionId();
int eventType = this.k.getEventType();
String eventTargetId = this.k.getEventTargetId();
int eventOptionId = this.k.getEventOptionId();
if (z4 != 0) {
i3 = 1;
} else {
i3 = this.t;
}
PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77648, new Class[0], TrendViewModel.class);
TrendViewModel trendViewModel = (TrendViewModel) (proxy2.isSupported ? proxy2.result : this.d.getValue());
PatchProxyResult proxy3 = PatchProxy.proxy(new Object[0], trendViewModel, TrendViewModel.changeQuickRedirect, false, 79850, new Class[0], String.class);
if (proxy3.isSupported) {
str = (String) proxy3.result;
} else {
str = trendViewModel.b;
}
this.E = l12.getAttentionFlow(context, z4, str2, 10, contentType, contentUnionId, eventType, eventTargetId, eventOptionId, i3, 1, str, HomeTrendHelper.b).subscribe(new c(this, z4), new d(this));
String str3 = HomeTrendHelper.b;
if (!(str3 == null || str3.length() == 0)) {
HomeTrendHelper.f11701c = true;
}
}
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public int getLayout() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77657, new Class[0], Integer.TYPE);
return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.fragment_attention_flow;
}
public final DuDelegateAdapter h() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77651, new Class[0], DuDelegateAdapter.class);
return (DuDelegateAdapter) (proxy.isSupported ? proxy.result : this.f11559g.getValue());
}
public final HomeTrendViewModel i() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77656, new Class[0], HomeTrendViewModel.class);
return (HomeTrendViewModel) (proxy.isSupported ? proxy.result : this.H.getValue());
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void initData() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77665, new Class[0], Void.TYPE).isSupported) {
this.J.c();
this.s = new PublishEventHandler(requireContext(), this, (LinearLayout) _$_findCachedViewById(R.id.viewNewPost), j());
Lifecycle lifecycle = getLifecycle();
PublishEventHandler publishEventHandler = this.s;
if (publishEventHandler == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
}
lifecycle.addObserver(publishEventHandler);
DuHttpRequest<CommunityListModel> getCdnAttentionDataRequest = l().getGetCdnAttentionDataRequest();
j jVar = new j(this, getCdnAttentionDataRequest.isShowErrorToast(), null);
Ref.BooleanRef booleanRef = new Ref.BooleanRef();
booleanRef.element = getCdnAttentionDataRequest.getMutableAllStateLiveData().getValue() instanceof DuHttpRequest.b.a;
getCdnAttentionDataRequest.getMutableAllStateLiveData().observe(i.f39125a.a(this), new AttentionFlowFragment$initData$$inlined$observe$1(getCdnAttentionDataRequest, jVar, booleanRef, this));
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77649, new Class[0], DoubleClickViewModel.class);
((DoubleClickViewModel) (proxy.isSupported ? proxy.result : this.e.getValue())).getDoubleClickLiveData().observe(this, new AttentionFlowFragment$initData$3(this));
PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77646, new Class[0], ActionTypeViewModel.class);
((ActionTypeViewModel) (proxy2.isSupported ? proxy2.result : this.b.getValue())).getActionType().observe(this, new AttentionFlowFragment$initData$4(this));
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77670, new Class[0], Void.TYPE).isSupported) {
CommunityListModel communityListModel = i().getCacheDataMap().get("community.attention.flow");
if (communityListModel != null) {
this.z = true;
if (!PatchProxy.proxy(new Object[]{communityListModel}, this, changeQuickRedirect, false, 77671, new Class[]{CommunityListModel.class}, Void.TYPE).isSupported) {
l().setLastId(communityListModel.getSafeLastId());
k().a(l().getLastId());
s();
q(communityListModel.getJoinCircleModel());
r(communityListModel.getLiveList());
j().setItems(communityListModel.getSafeList());
LoadMoreHelper loadMoreHelper = this.o;
if (loadMoreHelper == null) {
Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
}
loadMoreHelper.b(l().getLastId());
}
} else if (this.I == 0 && !PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77669, new Class[0], Void.TYPE).isSupported) {
this.p.s(false);
this.B = bj1.e.just("AttentionFlowFragment").map(qy.c.b).compose(pc.e.h()).subscribe(new qy.d(this), qy.e.b);
}
}
}
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
public void initView(@org.jetbrains.annotations.Nullable Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 77658, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
this.J.e();
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77659, new Class[0], Void.TYPE).isSupported) {
((DuSmartLayout) _$_findCachedViewById(R.id.refreshLayout)).setFooterHeight(o5.i.f36333a);
RecyclerView recyclerView = (RecyclerView) _$_findCachedViewById(R.id.recyclerView);
recyclerView.setLayoutManager(m());
recyclerView.setAdapter(h());
recyclerView.addItemDecoration(k());
((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).setRecycledViewPool(this.G);
LoadMoreHelper g3 = LoadMoreHelper.g(new qy.b(this), 5);
this.o = g3;
if (g3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
}
g3.d((RecyclerView) _$_findCachedViewById(R.id.recyclerView));
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77660, new Class[0], Void.TYPE).isSupported) {
DuDelegateAdapter h12 = h();
h12.uploadSensorExposure(true);
Object[] objArr = {new Byte((byte) 1)};
ChangeQuickRedirect changeQuickRedirect2 = DuDelegateAdapter.changeQuickRedirect;
Class cls = Boolean.TYPE;
if (!PatchProxy.proxy(objArr, h12, changeQuickRedirect2, false, 7553, new Class[]{cls}, Void.TYPE).isSupported) {
h12.f7797g = true;
}
if (!PatchProxy.proxy(new Object[]{new Byte((byte) 1)}, h12, DuDelegateAdapter.changeQuickRedirect, false, 7551, new Class[]{cls}, Void.TYPE).isSupported) {
h12.f = true;
}
h12.setExposureHelper(this.p, null);
h12.setPartialExposureHelper(this.f11561q);
h12.addAdapter(this.f11560h);
h12.addAdapter(this.i);
h12.addAdapter(this.j);
h12.addAdapter(j());
}
}
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77661, new Class[0], Void.TYPE).isSupported) {
((DuSmartLayout) _$_findCachedViewById(R.id.refreshLayout)).setDuRefreshListener(new qy.a(this));
Lifecycle lifecycle = getLifecycle();
RecyclerView recyclerView2 = (RecyclerView) _$_findCachedViewById(R.id.recyclerView);
AttentionScrollMonitor attentionScrollMonitor = new AttentionScrollMonitor(lifecycle, recyclerView2);
if (!PatchProxy.proxy(new Object[0], attentionScrollMonitor, AttentionScrollMonitor.changeQuickRedirect, false, 77800, new Class[0], Void.TYPE).isSupported) {
x0 x0Var = new x0();
AttentionScrollMonitor$monitorMachineRecorder$antiMachineRecorder$1$1 attentionScrollMonitor$monitorMachineRecorder$antiMachineRecorder$1$1 = AttentionScrollMonitor$monitorMachineRecorder$antiMachineRecorder$1$1.INSTANCE;
if (!PatchProxy.proxy(new Object[]{attentionScrollMonitor$monitorMachineRecorder$antiMachineRecorder$1$1}, x0Var, x0.changeQuickRedirect, false, 4682, new Class[]{Function2.class}, Void.TYPE).isSupported) {
x0Var.d = attentionScrollMonitor$monitorMachineRecorder$antiMachineRecorder$1$1;
}
recyclerView2.addOnItemTouchListener(new AttentionScrollMonitor$monitorMachineRecorder$1(x0Var));
}
if (!PatchProxy.proxy(new Object[0], attentionScrollMonitor, AttentionScrollMonitor.changeQuickRedirect, false, 77801, new Class[0], Void.TYPE).isSupported) {
ViewExtensionKt.f(recyclerView2, new AttentionScrollMonitor$monitorItemExpand$1(new y20.j(recyclerView2, 4)), null, 2);
}
ExposureExtraModel exposureExtraModel = this.l;
if (!PatchProxy.proxy(new Object[]{exposureExtraModel}, attentionScrollMonitor, AttentionScrollMonitor.changeQuickRedirect, false, 77805, new Class[]{ExposureExtraModel.class}, Void.TYPE).isSupported) {
attentionScrollMonitor.b = exposureExtraModel;
ViewExtensionKt.f(recyclerView2, null, new AttentionScrollMonitor$collectScrollInfo$1(exposureExtraModel), 1);
}
AttentionTrendAdapter j12 = j();
if (!PatchProxy.proxy(new Object[]{j12}, attentionScrollMonitor, AttentionScrollMonitor.changeQuickRedirect, false, 77802, new Class[]{AttentionTrendAdapter.class}, Void.TYPE).isSupported) {
attentionScrollMonitor.f11570a = new ar.b(j12, new cr.a((VirtualLayoutManager) recyclerView2.getLayoutManager(), recyclerView2));
ViewExtensionKt.e(recyclerView2, new AttentionScrollMonitor$startMonitorVideo$1(attentionScrollMonitor), new AttentionScrollMonitor$startMonitorVideo$2(attentionScrollMonitor));
}
attentionScrollMonitor.b(this);
Unit unit = Unit.INSTANCE;
this.r = attentionScrollMonitor;
}
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77663, new Class[0], Void.TYPE).isSupported) {
a.C0563a aVar = mn.a.f35714a;
aVar.g("https://cdn.poizon.com/node-common/f79fd2dde6bbca7be16a0fd59269858f.webp").y();
aVar.g("https://cdn.poizon.com/node-common/ab27f4976a5e3593180c8c6746f261a3.webp").y();
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77664, new Class[0], Void.TYPE).isSupported) {
ListUrlLoader listUrlLoader = new ListUrlLoader(new te1.e().a(new b.a(MediaItemModel.class).c("content-media").d(new ry.e()).a().b()), (RecyclerView) _$_findCachedViewById(R.id.recyclerView), getViewLifecycleOwner(), getContext());
listUrlLoader.d(10);
listUrlLoader.e("attention");
new w((RecyclerView) _$_findCachedViewById(R.id.recyclerView), getViewLifecycleOwner(), false, true, 0, 16);
}
}
this.C = l00.b.b();
}
}
@NotNull
public final AttentionTrendAdapter j() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77652, new Class[0], AttentionTrendAdapter.class);
return (AttentionTrendAdapter) (proxy.isSupported ? proxy.result : this.m.getValue());
}
public final LinearVerticalDecoration k() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77653, new Class[0], LinearVerticalDecoration.class);
return (LinearVerticalDecoration) (proxy.isSupported ? proxy.result : this.n.getValue());
}
public final AttentionListViewModel l() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77647, new Class[0], AttentionListViewModel.class);
return (AttentionListViewModel) (proxy.isSupported ? proxy.result : this.f11558c.getValue());
}
public final VirtualLayoutManager m() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77650, new Class[0], VirtualLayoutManager.class);
return (VirtualLayoutManager) (proxy.isSupported ? proxy.result : this.f.getValue());
}
public final void n() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77674, new Class[0], Void.TYPE).isSupported) {
LoadMoreHelper loadMoreHelper = this.o;
if (loadMoreHelper == null) {
Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
}
loadMoreHelper.b(l().getLastId());
this.k.resetVisitorAction();
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void notifyLoginEvent(@NotNull f fVar) {
if (!PatchProxy.proxy(new Object[]{fVar}, this, changeQuickRedirect, false, 77692, new Class[]{f.class}, Void.TYPE).isSupported) {
h().uploadSensorExposure(true);
h().setExposureHelper(this.p, null);
if (!fVar.f40639a) {
if (((LinearLayout) _$_findCachedViewById(R.id.viewNewPost)) != null && ((LinearLayout) _$_findCachedViewById(R.id.viewNewPost)).getChildCount() > 0) {
((LinearLayout) _$_findCachedViewById(R.id.viewNewPost)).removeAllViews();
}
isLoginStatusChanged();
UploadProgressManager a5 = UploadProgressManager.a();
if (!PatchProxy.proxy(new Object[0], a5, UploadProgressManager.changeQuickRedirect, false, 101789, new Class[0], Void.TYPE).isSupported) {
a5.f12886a.dismissAllDialog();
}
}
PublishEventHandler publishEventHandler = this.s;
if (publishEventHandler != null) {
if (publishEventHandler == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
}
if (!PatchProxy.proxy(new Object[0], publishEventHandler, PublishEventHandler.changeQuickRedirect, false, 77830, new Class[0], Void.TYPE).isSupported) {
for (Map.Entry<String, Boolean> entry : publishEventHandler.f11572c.entrySet()) {
String key = entry.getKey();
publishEventHandler.f11572c.put(key, Boolean.TRUE);
UploadProgressManager a12 = UploadProgressManager.a();
if (!PatchProxy.proxy(new Object[]{key}, a12, UploadProgressManager.changeQuickRedirect, false, 101788, new Class[]{String.class}, Void.TYPE).isSupported) {
a12.f12886a.cancelDialog(key);
}
}
}
}
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77693, new Class[0], Void.TYPE).isSupported) {
this.f11560h.clearItems();
this.i.clearItems();
this.j.clearItems();
j().clearItems();
}
fetchData(true);
}
}
public final void o(boolean z4, CommunityListModel communityListModel, boolean z5) {
String str;
String str2;
ArrayList<CommunityListItemModel> safeList;
CommunityListItemModel communityListItemModel;
CommunityListModel communityListModel2;
ArrayList<CommunityListItemModel> safeList2;
CommunityListItemModel communityListItemModel2;
CommunityListItemModel communityListItemModel3;
Integer num;
ArrayList<CommunityListItemModel> list;
Object[] objArr = {new Byte(z4 ? (byte) 1 : 0), communityListModel, new Byte(z5 ? (byte) 1 : 0)};
ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
Class cls = Boolean.TYPE;
if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 77672, new Class[]{cls, CommunityListModel.class, cls}, Void.TYPE).isSupported) {
PageLoadLogger.b(this.J, false, 1);
if (z4) {
if (!PatchProxy.proxy(new Object[]{communityListModel}, this, changeQuickRedirect, false, 77675, new Class[]{CommunityListModel.class}, Void.TYPE).isSupported && (communityListItemModel3 = (CommunityListItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) j().getList())) != null && communityListItemModel3.isLocalPublish()) {
communityListItemModel3.setLocalPublish(false);
ArrayList<CommunityListItemModel> list2 = communityListModel.getList();
if (list2 != null) {
Iterator<CommunityListItemModel> it2 = list2.iterator();
int i3 = 0;
while (true) {
if (!it2.hasNext()) {
i3 = -1;
break;
} else if (Intrinsics.areEqual(it2.next().getFeedId(), communityListItemModel3.getFeedId())) {
break;
} else {
i3++;
}
}
num = Integer.valueOf(i3);
} else {
num = null;
}
if (!(num == null || num.intValue() != -1 || (list = communityListModel.getList()) == null)) {
list.add(0, communityListItemModel3);
}
}
}
this.p.s(true);
CommunityListModel communityListModel3 = this.f11563v;
boolean z12 = (communityListModel3 == null || (safeList2 = communityListModel3.getSafeList()) == null || (communityListItemModel2 = (CommunityListItemModel) CollectionsKt___CollectionsKt.firstOrNull(safeList2)) == null || communityListItemModel2.getFeedType() != 9) ? false : true;
this.f11563v = communityListModel;
CommunityListItemModel communityListItemModel4 = (CommunityListItemModel) CollectionsKt___CollectionsKt.firstOrNull((List) communityListModel.getSafeList());
this.w = communityListItemModel4 != null && communityListItemModel4.getFeedType() == 9 && ServiceManager.s().isUserLogin() && !z12;
this.f11562u = communityListModel.getCdnLastId();
this.t = communityListModel.getPage();
if (z5) {
k().a("1");
} else {
k().a(l().getLastId());
}
if (z4) {
r(communityListModel.getLiveList());
str = "";
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77679, new Class[0], Void.TYPE).isSupported) {
CommunityListModel communityListModel4 = this.f11563v;
HomeTrendHelper homeTrendHelper = HomeTrendHelper.d;
if (communityListModel4 == null || (str2 = communityListModel4.getSafeMaxId()) == null) {
str2 = str;
}
if (!PatchProxy.proxy(new Object[]{this, str2}, homeTrendHelper, HomeTrendHelper.changeQuickRedirect, false, 79495, new Class[]{Fragment.class, String.class}, Void.TYPE).isSupported && l.c(this)) {
HomeTrendViewModel homeTrendViewModel = (HomeTrendViewModel) s.a(this, HomeTrendViewModel.class, null, null, 12);
homeTrendViewModel.setHasNewTrend(false);
homeTrendViewModel.setMaxId(str2);
}
if (ServiceManager.s().isUserLogin()) {
CommunityListModel communityListModel5 = this.f11563v;
boolean z13 = (communityListModel5 == null || (safeList = communityListModel5.getSafeList()) == null || (communityListItemModel = (CommunityListItemModel) CollectionsKt___CollectionsKt.firstOrNull(safeList)) == null || communityListItemModel.getFeedType() != 9 || (communityListModel2 = this.f11563v) == null || communityListModel2.isShowRecommendTip() != 1) ? false : true;
CommunityListModel communityListModel6 = this.f11563v;
if (communityListModel6 == null || communityListModel6.isShowRecommendTip() != 1) {
CommunityListModel communityListModel7 = this.f11563v;
if (t20.j.a(communityListModel7 != null ? Integer.valueOf(communityListModel7.getCount()) : null) == 0 && !z13) {
p("暂无更新", PushConstants.WORK_RECEIVER_EVENT_CORE_ERROR);
}
CommunityListModel communityListModel8 = this.f11563v;
int a5 = t20.j.a(communityListModel8 != null ? Integer.valueOf(communityListModel8.getCount()) : null);
if (a5 > 0 && ((TextView) _$_findCachedViewById(R.id.tvRefreshCount)) != null) {
p("为你更新" + a5 + "条新内容", PushConstants.WORK_RECEIVER_EVENT_CORE_ERROR);
}
} else {
p("暂无动态,看看推荐内容吧!", 1500);
}
}
if (isResumed()) {
EventBus.b().f(new NewAttentionTrendEvent(false));
EventBus.b().f(new ShowDewuTabRedDotEvent(false));
EventBus.b().f(new NewLiveEvent(false));
EventBus.b().f(new FavoriteUserEvent(null));
}
}
s();
} else {
str = "";
}
if (this.w && z4) {
i().getCacheDataMap().put("community.attention.flow", null);
communityListModel.getSafeList().remove(0);
j().setItemsSafely(communityListModel.getSafeList());
((RecyclerView) _$_findCachedViewById(R.id.recyclerView)).post(new e(this, (CommunityListItemModel) CollectionsKt___CollectionsKt.first((List) communityListModel.getSafeList()), communityListModel));
} else if (z4) {
if (!PatchProxy.proxy(new Object[]{communityListModel}, this, changeQuickRedirect, false, 77673, new Class[]{CommunityListModel.class}, Void.TYPE).isSupported) {
CommunityListModel communityListModel9 = new CommunityListModel(null, null, null, null, null, 0, null, null, 0, 0, 0, 0, null, 0, null, 0, 65535, null);
communityListModel9.setLastId(communityListModel.getLastId());
communityListModel9.setLiveList(communityListModel.getLiveList());
communityListModel9.setJoinCircleModel(communityListModel.getJoinCircleModel());
int size = communityListModel.getSafeList().size();
if (size > 0) {
communityListModel9.getSafeList().addAll(communityListModel.getSafeList().subList(0, RangesKt___RangesKt.coerceAtMost(size, 20)));
}
i().getCacheDataMap().put("community.attention.flow", communityListModel9);
}
j().setItems(communityListModel.getSafeList());
AttentionScrollMonitor attentionScrollMonitor = this.r;
if (attentionScrollMonitor == null) {
Intrinsics.throwUninitializedPropertyAccessException("scrollMonitor");
}
attentionScrollMonitor.a();
} else {
j().appendItems(communityListModel.getSafeList());
}
if (z5) {
LoadMoreHelper loadMoreHelper = this.o;
if (loadMoreHelper == null) {
Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
}
loadMoreHelper.b(str);
} else {
LoadMoreHelper loadMoreHelper2 = this.o;
if (loadMoreHelper2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("loadMoreHelper");
}
loadMoreHelper2.b(l().getLastId());
}
if (z4) {
((DuSmartLayout) _$_findCachedViewById(R.id.refreshLayout)).finishRefresh();
}
this.k.resetVisitorAction();
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void onCircleJoinStateEvent(@NotNull r20.b bVar) {
if (!PatchProxy.proxy(new Object[]{bVar}, this, changeQuickRedirect, false, 77695, new Class[]{r20.b.class}, Void.TYPE).isSupported) {
HomeTrendHelper homeTrendHelper = HomeTrendHelper.d;
AttentionJoinCircleAdapter attentionJoinCircleAdapter = this.i;
if (!PatchProxy.proxy(new Object[]{bVar, attentionJoinCircleAdapter}, homeTrendHelper, HomeTrendHelper.changeQuickRedirect, false, 79501, new Class[]{r20.b.class, AttentionJoinCircleAdapter.class}, Void.TYPE).isSupported) {
String str = "";
if (bVar.f37607a) {
if (attentionJoinCircleAdapter.getList().isEmpty()) {
JoinCircleModel joinCircleModel = new JoinCircleModel(null, null, 0, 7, null);
ArrayList<String> safeJoinCircleList = joinCircleModel.getSafeJoinCircleList();
String str2 = bVar.b;
if (str2 != null) {
str = str2;
}
safeJoinCircleList.add(str);
attentionJoinCircleAdapter.setItemsSafely(CollectionsKt__CollectionsJVMKt.listOf(joinCircleModel));
return;
}
ArrayList<String> safeJoinCircleList2 = ((JoinCircleModel) attentionJoinCircleAdapter.getList().get(0)).getSafeJoinCircleList();
String str3 = bVar.b;
if (str3 != null) {
str = str3;
}
safeJoinCircleList2.add(str);
attentionJoinCircleAdapter.notifyItemChanged(0);
} else if (!attentionJoinCircleAdapter.getList().isEmpty()) {
ArrayList<String> safeJoinCircleList3 = ((JoinCircleModel) attentionJoinCircleAdapter.getList().get(0)).getSafeJoinCircleList();
String str4 = bVar.b;
if (str4 != null) {
str = str4;
}
safeJoinCircleList3.remove(str);
if (((JoinCircleModel) attentionJoinCircleAdapter.getList().get(0)).getSafeJoinCircleList().isEmpty()) {
attentionJoinCircleAdapter.clearItems();
} else {
attentionJoinCircleAdapter.notifyItemChanged(0);
}
}
}
}
}
@Override // androidx.fragment.app.Fragment
public void onConfigurationChanged(@NotNull Configuration configuration) {
if (!PatchProxy.proxy(new Object[]{configuration}, this, changeQuickRedirect, false, 77687, new Class[]{Configuration.class}, Void.TYPE).isSupported) {
super.onConfigurationChanged(configuration);
j().notifyDataSetChanged();
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onCreate(Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 77699, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onCreate(this, bundle);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{layoutInflater, viewGroup, bundle}, this, changeQuickRedirect, false, 77703, new Class[]{LayoutInflater.class, ViewGroup.class, Bundle.class}, View.class);
return proxy.isSupported ? (View) proxy.result : _boostWeave.FragmentMethodWeaver_onCreateView(this, layoutInflater, viewGroup, bundle);
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onDestroyView() {
HashMap hashMap;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77688, new Class[0], Void.TYPE).isSupported) {
AttentionScrollMonitor attentionScrollMonitor = this.r;
if (attentionScrollMonitor == null) {
Intrinsics.throwUninitializedPropertyAccessException("scrollMonitor");
}
if (!PatchProxy.proxy(new Object[0], attentionScrollMonitor, AttentionScrollMonitor.changeQuickRedirect, false, 77804, new Class[0], Void.TYPE).isSupported) {
attentionScrollMonitor.f.removeCallbacks(attentionScrollMonitor.e);
ar.b bVar = attentionScrollMonitor.f11570a;
if (bVar != null) {
bVar.f();
}
}
super.onDestroyView();
Disposable disposable = this.F;
if (disposable != null) {
disposable.dispose();
}
FieldTransmissionUtils.f12956a.g(getContext());
Disposable disposable2 = this.B;
if (disposable2 != null) {
disposable2.dispose();
}
Disposable disposable3 = this.E;
if (disposable3 != null) {
disposable3.dispose();
}
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77698, new Class[0], Void.TYPE).isSupported && (hashMap = this.K) != null) {
hashMap.clear();
}
}
}
@Override // com.shizhuang.duapp.common.base.inter.IViewController, com.shizhuang.duapp.common.ui.BaseFragment
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
public void onEvent(@NotNull SCEvent sCEvent) {
if (!PatchProxy.proxy(new Object[]{sCEvent}, this, changeQuickRedirect, false, 77689, new Class[]{SCEvent.class}, Void.TYPE).isSupported && (sCEvent instanceof TeensModeChangeEvent)) {
boolean z4 = this.C;
boolean z5 = ((TeensModeChangeEvent) sCEvent).isModeOn;
if (z4 != z5) {
this.C = z5;
this.D = true;
}
AttentionScrollMonitor attentionScrollMonitor = this.r;
if (attentionScrollMonitor == null) {
Intrinsics.throwUninitializedPropertyAccessException("scrollMonitor");
}
attentionScrollMonitor.a();
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onPause() {
boolean z4 = false;
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77685, new Class[0], Void.TYPE).isSupported) {
super.onPause();
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77686, new Class[0], Void.TYPE).isSupported) {
long remainTime = getRemainTime();
if (remainTime >= ((long) 100)) {
l30.b bVar = l30.b.f34999a;
ArrayMap arrayMap = new ArrayMap(8);
if ("89".length() > 0) {
z4 = true;
}
if (z4) {
arrayMap.put("current_page", "89");
}
arrayMap.put("community_channel_id", SensorCommunityChannel.ATTENTION.getId());
arrayMap.put("view_duration", bVar.a(remainTime));
bVar.b("community_duration_pageview", arrayMap);
}
}
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onResume() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77681, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onResume(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onStart() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77701, new Class[0], Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onStart(this);
}
}
@Override // com.shizhuang.duapp.common.ui.BaseFragment, androidx.fragment.app.Fragment
public void onViewCreated(View view, Bundle bundle) {
if (!PatchProxy.proxy(new Object[]{view, bundle}, this, changeQuickRedirect, false, 77705, new Class[]{View.class, Bundle.class}, Void.TYPE).isSupported) {
_boostWeave.FragmentMethodWeaver_onViewCreated(this, view, bundle);
}
}
public final void p(String str, int i3) {
if (!PatchProxy.proxy(new Object[]{str, new Integer(i3)}, this, changeQuickRedirect, false, 77680, new Class[]{String.class, Integer.TYPE}, Void.TYPE).isSupported) {
((TextView) _$_findCachedViewById(R.id.tvRefreshCount)).setText(str);
AnimatorSet animatorSet = this.A;
if (animatorSet == null || !animatorSet.isRunning()) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat((TextView) _$_findCachedViewById(R.id.tvRefreshCount), "translationY", -((float) ((TextView) _$_findCachedViewById(R.id.tvRefreshCount)).getHeight()), 0.0f);
ofFloat.setDuration(250L);
ObjectAnimator ofFloat2 = ObjectAnimator.ofFloat((TextView) _$_findCachedViewById(R.id.tvRefreshCount), "translationY", 0.0f, -((float) ((TextView) _$_findCachedViewById(R.id.tvRefreshCount)).getHeight()));
ofFloat2.setDuration(250L);
ofFloat2.setStartDelay((long) i3);
AnimatorSet animatorSet2 = new AnimatorSet();
this.A = animatorSet2;
animatorSet2.playSequentially(ofFloat, ofFloat2);
AnimatorSet animatorSet3 = this.A;
if (animatorSet3 != null) {
animatorSet3.start();
}
}
}
}
public final void q(JoinCircleModel joinCircleModel) {
if (!PatchProxy.proxy(new Object[]{joinCircleModel}, this, changeQuickRedirect, false, 77677, new Class[]{JoinCircleModel.class}, Void.TYPE).isSupported) {
if (!cd.b.a(joinCircleModel)) {
List<String> joinCircleList = joinCircleModel.getJoinCircleList();
if (!(joinCircleList == null || joinCircleList.isEmpty())) {
List listOf = CollectionsKt__CollectionsJVMKt.listOf(joinCircleModel);
if (this.i.getList().isEmpty()) {
this.i.setItems(listOf);
return;
}
this.i.getList().set(0, joinCircleModel);
this.i.notifyItemChanged(0);
return;
}
}
if (!this.i.getList().isEmpty()) {
this.i.clearItems();
}
}
}
public final void r(ArrayList<AttentionLiveListItemModel> arrayList) {
boolean z4 = true;
if (!PatchProxy.proxy(new Object[]{arrayList}, this, changeQuickRedirect, false, 77678, new Class[]{ArrayList.class}, Void.TYPE).isSupported) {
if (arrayList != null && !arrayList.isEmpty()) {
z4 = false;
}
if (z4) {
this.j.clearItems();
} else {
this.j.setItems(CollectionsKt__CollectionsJVMKt.listOf(arrayList));
}
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void refreshListFromDetail(@NotNull zc.e eVar) {
if (!PatchProxy.proxy(new Object[]{eVar}, this, changeQuickRedirect, false, 77694, new Class[]{zc.e.class}, Void.TYPE).isSupported) {
CommunityCommonDelegate.f12815a.m(j(), eVar, false);
if (eVar.c()) {
AttentionScrollMonitor attentionScrollMonitor = this.r;
if (attentionScrollMonitor == null) {
Intrinsics.throwUninitializedPropertyAccessException("scrollMonitor");
}
attentionScrollMonitor.a();
}
}
}
public final void s() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77676, new Class[0], Void.TYPE).isSupported) {
if (ServiceManager.s().isUserLogin()) {
this.f11560h.setItemsSafely(null);
} else {
this.f11560h.setItemsSafely(CollectionsKt__CollectionsJVMKt.listOf(""));
}
}
}
public final void t() {
if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 77668, new Class[0], Void.TYPE).isSupported) {
l().getCdnAttentionData(this.f11562u, System.currentTimeMillis() / 3600000);
}
}
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
public final void onEvent(@NotNull r20.a aVar) {
PublishEventHandler publishEventHandler;
if (!PatchProxy.proxy(new Object[]{aVar}, this, changeQuickRedirect, false, 77690, new Class[]{r20.a.class}, Void.TYPE).isSupported && (publishEventHandler = this.s) != null) {
if (publishEventHandler == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
}
if (!PatchProxy.proxy(new Object[]{aVar}, publishEventHandler, PublishEventHandler.changeQuickRedirect, false, 77824, new Class[]{r20.a.class}, Void.TYPE).isSupported) {
String str = aVar.f37603a;
if (!(str == null || str.length() == 0)) {
TrendUploadViewModel trendUploadViewModel = aVar.b;
String str2 = aVar.f37603a;
if (str2 != null) {
int hashCode = str2.hashCode();
if (hashCode != -1804765340) {
if (hashCode != -1352294148) {
if (hashCode == 1750909789 && str2.equals("circle_publish_fail")) {
CircleModel circleModel = aVar.f37605g;
String str3 = aVar.f37606h;
if (!PatchProxy.proxy(new Object[]{circleModel, str3}, publishEventHandler, PublishEventHandler.changeQuickRedirect, false, 77825, new Class[]{CircleModel.class, String.class}, Void.TYPE).isSupported) {
TrendPublishTaskView trendPublishTaskView = new TrendPublishTaskView(publishEventHandler.d, null, 0, 6);
trendPublishTaskView.getTvMessage().setText(k0.c(R.string.failed_to_send));
trendPublishTaskView.getIvImage().i(circleModel.thumb).x();
trendPublishTaskView.getSendSuccessView().setVisibility(8);
trendPublishTaskView.getSendFailedView().setVisibility(0);
trendPublishTaskView.getProgressBar().setVisibility(8);
trendPublishTaskView.setCancelCallback(new PublishEventHandler$addPublishCircleInfoFailView$$inlined$apply$lambda$1(trendPublishTaskView, publishEventHandler, circleModel));
trendPublishTaskView.setRefreshCallback(new PublishEventHandler$addPublishCircleInfoFailView$$inlined$apply$lambda$2(trendPublishTaskView, publishEventHandler, circleModel));
publishEventHandler.f.addView(trendPublishTaskView);
publishEventHandler.b.put(str3, trendPublishTaskView);
}
EventBus.b().l(aVar);
}
} else if (str2.equals("create")) {
if (publishEventHandler.b.get(trendUploadViewModel.uploadId) == null) {
publishEventHandler.b.put(trendUploadViewModel.uploadId, publishEventHandler.a(trendUploadViewModel));
}
EventBus.b().l(aVar);
}
} else if (str2.equals("circle_publish_success")) {
String str4 = aVar.f37606h;
if (!PatchProxy.proxy(new Object[]{aVar, str4}, publishEventHandler, PublishEventHandler.changeQuickRedirect, false, 77826, new Class[]{r20.a.class, String.class}, Void.TYPE).isSupported) {
TrendPublishTaskView trendPublishTaskView2 = publishEventHandler.b.get(str4);
if (trendPublishTaskView2 != null) {
publishEventHandler.f.removeView(trendPublishTaskView2);
publishEventHandler.b.remove(str4);
}
publishEventHandler.f11573g.getList().add(0, publishEventHandler.c(aVar.f37604c));
publishEventHandler.f11573g.notifyDataSetChanged();
tf.a.i("MSG_ADD_TREND_SUCCESS", EventBus.b());
}
EventBus.b().l(aVar);
}
}
TrendPublishTaskView trendPublishTaskView3 = publishEventHandler.b.get(trendUploadViewModel.uploadId);
if (trendPublishTaskView3 != null && publishEventHandler.e.isAdded()) {
if (Intrinsics.areEqual("start", aVar.f37603a)) {
trendPublishTaskView3.getTvMessage().setText(aVar.e);
} else if (Intrinsics.areEqual("uploadSuccess", aVar.f37603a)) {
trendPublishTaskView3.getTvMessage().setText(aVar.e);
} else if (Intrinsics.areEqual("success", aVar.f37603a)) {
String str5 = trendUploadViewModel.shoeEvaluationId;
String str6 = trendUploadViewModel.uploadId;
CommunityFeedModel communityFeedModel = aVar.f37604c;
if (!PatchProxy.proxy(new Object[]{str6, communityFeedModel, trendPublishTaskView3, str5}, publishEventHandler, PublishEventHandler.changeQuickRedirect, false, 77828, new Class[]{String.class, CommunityFeedModel.class, TrendPublishTaskView.class, String.class}, Void.TYPE).isSupported) {
publishEventHandler.f11572c.remove(str6);
trendPublishTaskView3.getTvMessage().setText(k0.c(R.string.success_to_send));
trendPublishTaskView3.getSendSuccessView().setVisibility(0);
q.e().postDelayed(new ry.b(publishEventHandler, trendPublishTaskView3), 500);
publishEventHandler.f11573g.getList().add(0, publishEventHandler.c(communityFeedModel));
publishEventHandler.f11573g.notifyDataSetChanged();
EventBus b2 = EventBus.b();
MessageEvent messageEvent = new MessageEvent("MSG_ADD_TREND_SUCCESS");
messageEvent.setContentId(communityFeedModel.getContent().getContentId());
Unit unit = Unit.INSTANCE;
b2.f(messageEvent);
if (!TextUtils.isEmpty(str5)) {
tf.a.i("MSG_SHOE_EVALUATION_PUBLISH_SUCCESS", EventBus.b());
}
}
} else if (Intrinsics.areEqual("progress", aVar.f37603a)) {
trendPublishTaskView3.getProgressBar().setProgress(aVar.d);
} else if (Intrinsics.areEqual("fail", aVar.f37603a)) {
publishEventHandler.b(trendUploadViewModel, trendPublishTaskView3, aVar.e, aVar.f37603a);
} else if (Intrinsics.areEqual("remove", aVar.f37603a)) {
trendPublishTaskView3.getSendFailedView().setVisibility(0);
trendPublishTaskView3.getTvMessage().setText(aVar.e);
} else if (Intrinsics.areEqual("forbid", aVar.f37603a)) {
publishEventHandler.b(trendUploadViewModel, trendPublishTaskView3, aVar.e, aVar.f37603a);
}
EventBus.b().l(aVar);
}
}
}
if (Intrinsics.areEqual(aVar.f37603a, "success") || Intrinsics.areEqual(aVar.f37603a, "circle_publish_success")) {
AttentionScrollMonitor attentionScrollMonitor = this.r;
if (attentionScrollMonitor == null) {
Intrinsics.throwUninitializedPropertyAccessException("scrollMonitor");
}
attentionScrollMonitor.a();
}
}
}
}