package wp1; import android.content.Intent; import android.os.Bundle; import android.text.Editable; import android.text.InputFilter; import android.widget.TextView; import androidx.recyclerview.widget.DiffUtil; import com.drakeet.multitype.MultiTypeAdapter; import com.meizu.cloud.pushsdk.notification.model.AdvanceSetting; import com.xingin.android.mixim.msg.MsgType; import com.xingin.android.redutils.base.XhsActivity; import com.xingin.entities.x; import com.xingin.matrix.profile.R$string; import com.xingin.matrix.v2.profile.editinformation.editdescription.EditDescriptionPresenter; import com.xingin.matrix.v2.profile.editinformation.entities.AtUserInDesc; import com.xingin.matrix.v2.profile.editinformation.entities.EditCommonInfo; import com.xingin.matrix.v2.profile.editinformation.entities.EditInfoBean; import com.xingin.matrix.v2.profile.editinformation.entities.Tips; import com.xingin.xhstheme.R$color; import dw2.r; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import kotlin.Metadata; import kotlin.Pair; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.FunctionReferenceImpl; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.Lambda; import kotlin.text.StringsKt__StringsKt; import t10.m0; import vq1.l; import vq1.t; import x21.q; @Metadata(bv = {}, d1 = {"\u0000\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\r\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\t\u0018\u00002\u0014\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0000\u0012\u0004\u0012\u00020\u00030\u0001B\u0007¢\u0006\u0004\bG\u0010HJ\u0012\u0010\u0007\u001a\u00020\u00062\b\u0010\u0005\u001a\u0004\u0018\u00010\u0004H\u0014J\b\u0010\b\u001a\u00020\u0006H\u0002J\b\u0010\t\u001a\u00020\u0006H\u0002J\b\u0010\n\u001a\u00020\u0006H\u0002J\u001a\u0010\u000f\u001a\u00020\u00062\u0006\u0010\f\u001a\u00020\u000b2\b\b\u0002\u0010\u000e\u001a\u00020\rH\u0002J\"\u0010\u0015\u001a\u00020\u00062\u0018\u0010\u0014\u001a\u0014\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00120\u0011\u0012\u0004\u0012\u00020\u00130\u0010H\u0002J\u0010\u0010\u0018\u001a\u00020\u00062\u0006\u0010\u0017\u001a\u00020\u0016H\u0002J\u0010\u0010\u001c\u001a\u00020\u001b2\u0006\u0010\u001a\u001a\u00020\u0019H\u0002R\"\u0010\u001e\u001a\u00020\u001d8\u0006@\u0006X.¢\u0006\u0012\n\u0004\b\u001e\u0010\u001f\u001a\u0004\b \u0010!\"\u0004\b\"\u0010#R\"\u0010%\u001a\u00020$8\u0006@\u0006X.¢\u0006\u0012\n\u0004\b%\u0010&\u001a\u0004\b'\u0010(\"\u0004\b)\u0010*R\"\u0010,\u001a\u00020+8\u0006@\u0006X.¢\u0006\u0012\n\u0004\b,\u0010-\u001a\u0004\b.\u0010/\"\u0004\b0\u00101R\"\u00103\u001a\u0002028\u0006@\u0006X.¢\u0006\u0012\n\u0004\b3\u00104\u001a\u0004\b5\u00106\"\u0004\b7\u00108R\"\u0010:\u001a\u0002098\u0006@\u0006X.¢\u0006\u0012\n\u0004\b:\u0010;\u001a\u0004\b<\u0010=\"\u0004\b>\u0010?R(\u0010A\u001a\b\u0012\u0004\u0012\u00020\u001b0@8\u0006@\u0006X.¢\u0006\u0012\n\u0004\bA\u0010B\u001a\u0004\bC\u0010D\"\u0004\bE\u0010F¨\u0006I"}, d2 = {"Lwp1/m;", "Ltu0/b;", "Lcom/xingin/matrix/v2/profile/editinformation/editdescription/EditDescriptionPresenter;", "Lwp1/p;", "Landroid/os/Bundle;", "savedInstanceState", "", "onAttach", "e1", "W0", "V0", "", "keyWord", "", "isRefresh", "f1", "Lkotlin/Pair;", "", "", "Landroidx/recyclerview/widget/DiffUtil$DiffResult;", AdvanceSetting.NETWORK_TYPE, "X0", "Lyb1/d;", "user", "U0", "", MsgType.TYPE_TEXT, "", "b1", "Lcom/xingin/android/redutils/base/XhsActivity;", "activity", "Lcom/xingin/android/redutils/base/XhsActivity;", "getActivity", "()Lcom/xingin/android/redutils/base/XhsActivity;", "setActivity", "(Lcom/xingin/android/redutils/base/XhsActivity;)V", "Lcom/xingin/matrix/v2/profile/editinformation/entities/EditCommonInfo;", "editCommonInfo", "Lcom/xingin/matrix/v2/profile/editinformation/entities/EditCommonInfo;", "c1", "()Lcom/xingin/matrix/v2/profile/editinformation/entities/EditCommonInfo;", "setEditCommonInfo", "(Lcom/xingin/matrix/v2/profile/editinformation/entities/EditCommonInfo;)V", "Lvq1/t;", "editUpdateInfoRepository", "Lvq1/t;", "d1", "()Lvq1/t;", "setEditUpdateInfoRepository", "(Lvq1/t;)V", "Lvq1/l;", "atFollowRepo", "Lvq1/l;", "a1", "()Lvq1/l;", "setAtFollowRepo", "(Lvq1/l;)V", "Lcom/drakeet/multitype/MultiTypeAdapter;", "atFollowAdapter", "Lcom/drakeet/multitype/MultiTypeAdapter;", "Y0", "()Lcom/drakeet/multitype/MultiTypeAdapter;", "setAtFollowAdapter", "(Lcom/drakeet/multitype/MultiTypeAdapter;)V", "Ldx2/d;", "atFollowItemClick", "Ldx2/d;", "Z0", "()Ldx2/d;", "setAtFollowItemClick", "(Ldx2/d;)V", "<init>", "()V", "matrix_profile_library_release"}, k = 1, mv = {1, 6, 0}) /* compiled from: EditDescriptionController.kt */ public final class m extends tu0.b<EditDescriptionPresenter, m, p> { /* renamed from: a reason: collision with root package name */ public XhsActivity f150823a; /* renamed from: b reason: collision with root package name */ public EditCommonInfo f150824b; /* renamed from: c reason: collision with root package name */ public t f150825c; /* renamed from: d reason: collision with root package name */ public l f150826d; /* renamed from: e reason: collision with root package name */ public MultiTypeAdapter f150827e; /* renamed from: f reason: collision with root package name */ public dx2.d<Integer> f150828f; @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Loq1/c;", AdvanceSetting.NETWORK_TYPE, "", "a", "(Loq1/c;)V"}, k = 3, mv = {1, 6, 0}) /* compiled from: EditDescriptionController.kt */ public static final class a extends Lambda implements Function1<oq1.c, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150829a; @Metadata(d1 = {"\u0000\u001a\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0018\u0010\u0002\u001a\u0014\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0004\u0012\u00020\u00060\u0003H\n¢\u0006\u0002\b\u0007"}, d2 = {"<anonymous>", "", "result", "Lkotlin/Pair;", "", "", "Landroidx/recyclerview/widget/DiffUtil$DiffResult;", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48) /* renamed from: wp1.m$a$a reason: collision with other inner class name */ /* compiled from: EditDescriptionController.kt */ public static final class C2423a extends Lambda implements Function1<Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult>, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150830a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ oq1.c f150831b; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public C2423a(m mVar, oq1.c cVar) { super(1); this.f150830a = mVar; this.f150831b = cVar; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult> pair) { invoke(pair); return Unit.INSTANCE; } public final void invoke(Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult> pair) { Intrinsics.checkNotNullParameter(pair, "result"); this.f150830a.X0(pair); ((EditDescriptionPresenter) this.f150830a.getPresenter()).V(true); m.h1(this.f150830a, this.f150831b.getKeyWord(), false, 2, null); } } @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public static final class b extends Lambda implements Function0<Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150832a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ int f150833b; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public b(m mVar, int i10) { super(0); this.f150832a = mVar; this.f150833b = i10; } @Override // kotlin.jvm.functions.Function0 public final void invoke() { this.f150832a.a1().q().remove(this.f150833b); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public a(m mVar) { super(1); this.f150829a = mVar; } public final void a(oq1.c cVar) { Intrinsics.checkNotNullParameter(cVar, AdvanceSetting.NETWORK_TYPE); String status = cVar.getStatus(); int hashCode = status.hashCode(); boolean z14 = false; if (hashCode != -388190467) { if (hashCode != 1031001834) { if (hashCode == 1266361668 && status.equals("check_at_follow_delete")) { m mVar = this.f150829a; Editable text = ((EditDescriptionPresenter) mVar.getPresenter()).u().getText(); Intrinsics.checkNotNullExpressionValue(text, "presenter.getEditText().text"); int b14 = mVar.b1(text); if (b14 < this.f150829a.a1().q().size()) { z14 = true; } bj2.b.b(z14, new b(this.f150829a, b14)); } } else if (status.equals("at_follow_search")) { if (cVar.getKeyWord().length() == 0) { m.h1(this.f150829a, cVar.getKeyWord(), false, 2, null); ((EditDescriptionPresenter) this.f150829a.getPresenter()).V(true); return; } r<Pair<List<Object>, DiffUtil.DiffResult>> F = this.f150829a.a1().F(); m mVar2 = this.f150829a; bj2.h.d(F, mVar2, new C2423a(mVar2, cVar)); } } else if (status.equals("hide_at_follow_list")) { ((EditDescriptionPresenter) this.f150829a.getPresenter()).V(false); } } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(oq1.c cVar) { a(cVar); return Unit.INSTANCE; } } @Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "", "kotlin.jvm.PlatformType", "invoke", "(Ljava/lang/Integer;)V"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public static final class b extends Lambda implements Function1<Integer, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150834a; @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lyb1/d;", "user", "", "a", "(Lyb1/d;)V"}, k = 3, mv = {1, 6, 0}) /* compiled from: EditDescriptionController.kt */ public static final class a extends Lambda implements Function1<yb1.d, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150835a; @Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48) /* renamed from: wp1.m$b$a$a reason: collision with other inner class name */ /* compiled from: EditDescriptionController.kt */ public static final class C2424a extends Lambda implements Function0<Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150836a; /* renamed from: b reason: collision with root package name */ public final /* synthetic */ yb1.d f150837b; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public C2424a(m mVar, yb1.d dVar) { super(0); this.f150836a = mVar; this.f150837b = dVar; } @Override // kotlin.jvm.functions.Function0 public final void invoke() { ((EditDescriptionPresenter) this.f150836a.getPresenter()).N(this.f150837b.getNickname(), this.f150836a.a1().s()); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public a(m mVar) { super(1); this.f150835a = mVar; } public final void a(yb1.d dVar) { Intrinsics.checkNotNullParameter(dVar, "user"); bj2.b.b(dVar.getNickname().length() > 0, new C2424a(this.f150835a, dVar)); ((EditDescriptionPresenter) this.f150835a.getPresenter()).V(false); this.f150835a.U0(dVar); } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(yb1.d dVar) { a(dVar); return Unit.INSTANCE; } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public b(m mVar) { super(1); this.f150834a = mVar; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Integer num) { invoke(num); return Unit.INSTANCE; } public final void invoke(Integer num) { l a14 = this.f150834a.a1(); Intrinsics.checkNotNullExpressionValue(num, AdvanceSetting.NETWORK_TYPE); r<yb1.d> n14 = a14.n(num.intValue()); m mVar = this.f150834a; bj2.h.d(n14, mVar, new a(mVar)); } } @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0001H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "invoke", "(Lkotlin/Unit;)V"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public static final class c extends Lambda implements Function1<Unit, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150838a; @Metadata(k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public /* synthetic */ class a extends FunctionReferenceImpl implements Function1<Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult>, Unit> { public a(Object obj) { super(1, obj, m.class, "dispatchUpdatesToRecyclerView", "dispatchUpdatesToRecyclerView(Lkotlin/Pair;)V", 0); } public final void a(Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult> pair) { Intrinsics.checkNotNullParameter(pair, "p0"); ((m) this.receiver).X0(pair); } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult> pair) { a(pair); return Unit.INSTANCE; } } @Metadata(k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public /* synthetic */ class b extends FunctionReferenceImpl implements Function1<Throwable, Unit> { public b(Object obj) { super(1, obj, z41.l.class, "logError", "logError(Ljava/lang/Throwable;)V", 0); } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Throwable th3) { invoke(th3); return Unit.INSTANCE; } public final void invoke(Throwable th3) { Intrinsics.checkNotNullParameter(th3, "p0"); z41.l.f(th3); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public c(m mVar) { super(1); this.f150838a = mVar; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Unit unit) { invoke(unit); return Unit.INSTANCE; } public final void invoke(Unit unit) { Intrinsics.checkNotNullParameter(unit, AdvanceSetting.NETWORK_TYPE); r W0 = l.u(this.f150838a.a1(), null, false, 1, null).W0(gw2.a.a()); Intrinsics.checkNotNullExpressionValue(W0, "atFollowRepo.searchAtCon…dSchedulers.mainThread())"); bj2.h.f(W0, this.f150838a, new a(this.f150838a), new b(z41.l.f160483a)); } } @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lcom/xingin/matrix/v2/profile/editinformation/editdescription/EditDescriptionPresenter$a;", AdvanceSetting.NETWORK_TYPE, "", "a", "(Lcom/xingin/matrix/v2/profile/editinformation/editdescription/EditDescriptionPresenter$a;)V"}, k = 3, mv = {1, 6, 0}) /* compiled from: EditDescriptionController.kt */ public static final class d extends Lambda implements Function1<EditDescriptionPresenter.a, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150839a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public d(m mVar) { super(1); this.f150839a = mVar; } public final void a(EditDescriptionPresenter.a aVar) { Intrinsics.checkNotNullParameter(aVar, AdvanceSetting.NETWORK_TYPE); if (aVar.a().length() == 0) { ((EditDescriptionPresenter) this.f150839a.getPresenter()).U(false); ((EditDescriptionPresenter) this.f150839a.getPresenter()).Q(false); } else { ((EditDescriptionPresenter) this.f150839a.getPresenter()).U(true); TextView y14 = ((EditDescriptionPresenter) this.f150839a.getPresenter()).y(); StringBuilder sb3 = new StringBuilder(String.valueOf(aVar.a().length())); sb3.append(this.f150839a.getActivity().getResources().getString(R$string.d0e)); y14.setText(sb3); String obj = aVar.a().toString(); EditInfoBean editInfo = this.f150839a.c1().getEditInfo(); if (Intrinsics.areEqual(obj, editInfo != null ? editInfo.getValue() : null)) { ((EditDescriptionPresenter) this.f150839a.getPresenter()).Q(false); } else { ((EditDescriptionPresenter) this.f150839a.getPresenter()).Q(true); } } ((EditDescriptionPresenter) this.f150839a.getPresenter()).n(((EditDescriptionPresenter) this.f150839a.getPresenter()).u().getText()); } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(EditDescriptionPresenter.a aVar) { a(aVar); return Unit.INSTANCE; } } @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0001H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "invoke", "(Lkotlin/Unit;)V"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public static final class e extends Lambda implements Function1<Unit, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150840a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public e(m mVar) { super(1); this.f150840a = mVar; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Unit unit) { invoke(unit); return Unit.INSTANCE; } public final void invoke(Unit unit) { Tips tips; Intrinsics.checkNotNullParameter(unit, AdvanceSetting.NETWORK_TYPE); EditInfoBean editInfo = this.f150840a.c1().getEditInfo(); if (editInfo != null && !editInfo.getAllowEdit()) { EditInfoBean editInfo2 = this.f150840a.c1().getEditInfo(); al2.e.g((editInfo2 == null || (tips = editInfo2.getTips()) == null) ? null : tips.getToast()); ((EditDescriptionPresenter) this.f150840a.getPresenter()).R(false); return; } ((EditDescriptionPresenter) this.f150840a.getPresenter()).R(true); } } @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0001H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "invoke", "(Lkotlin/Unit;)V"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public static final class f extends Lambda implements Function1<Unit, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150841a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public f(m mVar) { super(1); this.f150841a = mVar; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Unit unit) { invoke(unit); return Unit.INSTANCE; } public final void invoke(Unit unit) { Intrinsics.checkNotNullParameter(unit, AdvanceSetting.NETWORK_TYPE); this.f150841a.getActivity().finish(); } } @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0001H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "invoke", "(Lkotlin/Unit;)V"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public static final class g extends Lambda implements Function1<Unit, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150842a; @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lcom/xingin/entities/x;", AdvanceSetting.NETWORK_TYPE, "", "a", "(Lcom/xingin/entities/x;)V"}, k = 3, mv = {1, 6, 0}) /* compiled from: EditDescriptionController.kt */ public static final class a extends Lambda implements Function1<x, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150843a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public a(m mVar) { super(1); this.f150843a = mVar; } public final void a(x xVar) { Intrinsics.checkNotNullParameter(xVar, AdvanceSetting.NETWORK_TYPE); Intent intent = new Intent(); intent.putExtra("update_is_success_key", true); this.f150843a.getActivity().setResult(-1, intent); this.f150843a.getActivity().finish(); } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(x xVar) { a(xVar); return Unit.INSTANCE; } } @Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0003\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public static final class b extends Lambda implements Function1<Throwable, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150844a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public b(m mVar) { super(1); this.f150844a = mVar; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Throwable th3) { invoke(th3); return Unit.INSTANCE; } public final void invoke(Throwable th3) { Intrinsics.checkNotNullParameter(th3, AdvanceSetting.NETWORK_TYPE); z41.l.f(th3); Intent intent = new Intent(); boolean z14 = false; intent.putExtra("update_is_success_key", false); this.f150844a.getActivity().setResult(-1, intent); String message = th3.getMessage(); if (message == null || message.length() == 0) { z14 = true; } al2.e.g(z14 ? this.f150844a.getActivity().getString(R$string.d0f) : th3.getMessage()); this.f150844a.getActivity().finish(); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public g(m mVar) { super(1); this.f150842a = mVar; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Unit unit) { invoke(unit); return Unit.INSTANCE; } public final void invoke(Unit unit) { r<x> rVar; Intrinsics.checkNotNullParameter(unit, AdvanceSetting.NETWORK_TYPE); if (!q.f152240a.q()) { rVar = this.f150842a.a1().H("desc", ((EditDescriptionPresenter) this.f150842a.getPresenter()).u().getText().toString()); } else { rVar = t.d(this.f150842a.d1(), "desc", ((EditDescriptionPresenter) this.f150842a.getPresenter()).u().getText().toString(), null, 4, null); } m mVar = this.f150842a; bj2.h.f(rVar, mVar, new a(mVar), new b(this.f150842a)); } } @Metadata(d1 = {"\u0000\u001c\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u000122\u0010\u0002\u001a.\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0004\u0012\u00020\u0006 \u0007*\u0016\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\b"}, d2 = {"<anonymous>", "", AdvanceSetting.NETWORK_TYPE, "Lkotlin/Pair;", "", "", "Landroidx/recyclerview/widget/DiffUtil$DiffResult;", "kotlin.jvm.PlatformType", "invoke"}, k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public static final class h extends Lambda implements Function1<Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult>, Unit> { /* renamed from: a reason: collision with root package name */ public final /* synthetic */ m f150845a; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public h(m mVar) { super(1); this.f150845a = mVar; } public static final void b(m mVar, Pair pair) { Intrinsics.checkNotNullParameter(mVar, "this$0"); Intrinsics.checkNotNullExpressionValue(pair, AdvanceSetting.NETWORK_TYPE); mVar.X0(pair); } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult> pair) { invoke(pair); return Unit.INSTANCE; } public final void invoke(Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult> pair) { ((EditDescriptionPresenter) this.f150845a.getPresenter()).getRecyclerView().post(new n(this.f150845a, pair)); } } @Metadata(k = 3, mv = {1, 6, 0}, xi = 48) /* compiled from: EditDescriptionController.kt */ public /* synthetic */ class i extends FunctionReferenceImpl implements Function1<Throwable, Unit> { public i(Object obj) { super(1, obj, z41.l.class, "logError", "logError(Ljava/lang/Throwable;)V", 0); } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(Throwable th3) { invoke(th3); return Unit.INSTANCE; } public final void invoke(Throwable th3) { Intrinsics.checkNotNullParameter(th3, "p0"); z41.l.f(th3); } } public static /* synthetic */ void h1(m mVar, String str, boolean z14, int i10, Object obj) { if ((i10 & 2) != 0) { z14 = true; } mVar.f1(str, z14); } public final void U0(yb1.d dVar) { Editable text = ((EditDescriptionPresenter) getPresenter()).u().getText(); Intrinsics.checkNotNullExpressionValue(text, MsgType.TYPE_TEXT); int b14 = b1(text); AtUserInDesc atUserInDesc = new AtUserInDesc(dVar.getUserid(), dVar.getNickname()); if (b14 == a1().q().size()) { a1().q().add(atUserInDesc); } else { a1().q().add(b14, atUserInDesc); } } public final void V0() { bj2.h.d(((EditDescriptionPresenter) getPresenter()).K(), this, new a(this)); bj2.h.d(Z0(), this, new b(this)); bj2.h.d(((EditDescriptionPresenter) getPresenter()).J(), this, new c(this)); } public final void W0() { String value; List<AtUserInDesc> list; List<AtUserInDesc> atUserList; EditInfoBean editInfo = c1().getEditInfo(); if (!(editInfo == null || (value = editInfo.getValue()) == null)) { if (!q.f152240a.q()) { EditDescriptionPresenter editDescriptionPresenter = (EditDescriptionPresenter) getPresenter(); EditInfoBean editInfo2 = c1().getEditInfo(); if (editInfo2 == null || (list = editInfo2.getAtUserList()) == null) { list = new ArrayList<>(); } editDescriptionPresenter.B(value, list); EditInfoBean editInfo3 = c1().getEditInfo(); if (!(editInfo3 == null || (atUserList = editInfo3.getAtUserList()) == null)) { Iterator<T> it3 = atUserList.iterator(); while (it3.hasNext()) { a1().q().add(it3.next()); } } } else { ((EditDescriptionPresenter) getPresenter()).u().setText(value); } ((EditDescriptionPresenter) getPresenter()).u().setSelection(value.length()); TextView y14 = ((EditDescriptionPresenter) getPresenter()).y(); StringBuilder sb3 = new StringBuilder(String.valueOf(value.length())); sb3.append(getActivity().getResources().getString(R$string.d0e)); y14.setText(sb3); } ((EditDescriptionPresenter) getPresenter()).z().setEnabled(false); bj2.h.d(((EditDescriptionPresenter) getPresenter()).w(), this, new d(this)); bj2.h.d(((EditDescriptionPresenter) getPresenter()).v(), this, new e(this)); bj2.h.d(((EditDescriptionPresenter) getPresenter()).s(), this, new f(this)); bj2.h.d(((EditDescriptionPresenter) getPresenter()).A(), this, new g(this)); if (!q.f152240a.q()) { V0(); } } public final void X0(Pair<? extends List<? extends Object>, ? extends DiffUtil.DiffResult> pair) { Y0().o((List) pair.getFirst()); ((DiffUtil.DiffResult) pair.getSecond()).dispatchUpdatesTo(Y0()); } public final MultiTypeAdapter Y0() { MultiTypeAdapter multiTypeAdapter = this.f150827e; if (multiTypeAdapter != null) { return multiTypeAdapter; } Intrinsics.throwUninitializedPropertyAccessException("atFollowAdapter"); return null; } public final dx2.d<Integer> Z0() { dx2.d<Integer> dVar = this.f150828f; if (dVar != null) { return dVar; } Intrinsics.throwUninitializedPropertyAccessException("atFollowItemClick"); return null; } public final l a1() { l lVar = this.f150826d; if (lVar != null) { return lVar; } Intrinsics.throwUninitializedPropertyAccessException("atFollowRepo"); return null; } public final int b1(CharSequence charSequence) { int i10 = 0; CharSequence subSequence = charSequence.subSequence(0, ((EditDescriptionPresenter) getPresenter()).u().getSelectionStart()); for (AtUserInDesc atUserInDesc : a1().q()) { int i14 = StringsKt__StringsKt.indexOf$default(subSequence, '@', 0, false, 6, (Object) null); if (i10 >= a1().q().size() || i14 == -1 || atUserInDesc.getNickname().length() + i14 >= subSequence.length() || !Intrinsics.areEqual(subSequence.subSequence(i14 + 1, i14 + atUserInDesc.getNickname().length() + 1).toString(), atUserInDesc.getNickname())) { break; } i10++; } return i10; } public final EditCommonInfo c1() { EditCommonInfo editCommonInfo = this.f150824b; if (editCommonInfo != null) { return editCommonInfo; } Intrinsics.throwUninitializedPropertyAccessException("editCommonInfo"); return null; } public final t d1() { t tVar = this.f150825c; if (tVar != null) { return tVar; } Intrinsics.throwUninitializedPropertyAccessException("editUpdateInfoRepository"); return null; } public final void e1() { Tips tips; m0 m0Var = m0.f132115a; m0Var.y(getActivity()); m0Var.I(getActivity()); ((EditDescriptionPresenter) getPresenter()).t().setText(getActivity().getString(R$string.cvk)); ((EditDescriptionPresenter) getPresenter()).u().setHint(getActivity().getString(R$string.d4r)); ((EditDescriptionPresenter) getPresenter()).u().setFilters(new InputFilter.LengthFilter[]{new InputFilter.LengthFilter(100)}); EditDescriptionPresenter editDescriptionPresenter = (EditDescriptionPresenter) getPresenter(); EditInfoBean editInfo = c1().getEditInfo(); editDescriptionPresenter.S((editInfo == null || (tips = editInfo.getTips()) == null) ? null : tips.getNotice()); if (!q.f152240a.q()) { ((EditDescriptionPresenter) getPresenter()).H(Y0()); ((EditDescriptionPresenter) getPresenter()).F(); ((EditDescriptionPresenter) getPresenter()).C(); } ((EditDescriptionPresenter) getPresenter()).O(); EditInfoBean editInfo2 = c1().getEditInfo(); if (editInfo2 != null) { boolean allowEdit = editInfo2.getAllowEdit(); ((EditDescriptionPresenter) getPresenter()).P(allowEdit); ((EditDescriptionPresenter) getPresenter()).U(allowEdit); if (allowEdit) { ((EditDescriptionPresenter) getPresenter()).u().setTextColor(nu2.f.e(R$color.xhsTheme_colorGrayLevel1)); } else { ((EditDescriptionPresenter) getPresenter()).u().setTextColor(nu2.f.e(R$color.xhsTheme_colorGrayLevel3)); } } xq1.b.f155547a.c(); } public final void f1(String str, boolean z14) { r<Pair<List<Object>, DiffUtil.DiffResult>> rVar; if (str.length() == 0) { rVar = a1().C(); } else { rVar = a1().t(str, z14); } r<Pair<List<Object>, DiffUtil.DiffResult>> W0 = rVar.W0(gw2.a.a()); Intrinsics.checkNotNullExpressionValue(W0, "if (keyWord.isEmpty()) {…dSchedulers.mainThread())"); bj2.h.f(W0, this, new h(this), new i(z41.l.f160483a)); } public final XhsActivity getActivity() { XhsActivity xhsActivity = this.f150823a; if (xhsActivity != null) { return xhsActivity; } Intrinsics.throwUninitializedPropertyAccessException("activity"); return null; } @Override // tu0.b public void onAttach(Bundle bundle) { super.onAttach(bundle); e1(); W0(); } }