package com.kwad.components.ct.profile.home.b; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.text.TextUtils; import android.widget.ImageView; import android.widget.TextView; import com.kwad.components.ct.profile.home.a.a; import com.kwad.components.ct.profile.home.model.UserProfile; import com.kwad.components.offline.api.core.api.INet; import com.kwad.sdk.R; import com.kwad.sdk.core.imageloader.KSImageLoader; import com.kwad.sdk.glide.f; import com.kwad.sdk.glide.load.engine.GlideException; import com.kwad.sdk.utils.bb; public final class c extends a { private TextView azn; private TextView azo; private com.kwad.components.ct.profile.home.kwai.a azp = new com.kwad.components.ct.profile.home.kwai.a() { /* class com.kwad.components.ct.profile.home.b.c.AnonymousClass2 */ @Override // com.kwad.components.ct.profile.home.kwai.a public final void d(UserProfile userProfile) { c.this.e((c) userProfile); } }; private ImageView xX; private TextView xY; /* access modifiers changed from: private */ /* access modifiers changed from: public */ private void e(UserProfile userProfile) { this.azn.setText(bb.aw(userProfile.ownerCount.fansCount)); this.azo.setText(bb.aw(userProfile.ownerCount.followCount)); this.xY.setText(TextUtils.isEmpty(userProfile.authorName) ? "-" : userProfile.authorName); } @Override // com.kwad.sdk.mvp.Presenter, com.kwad.components.ct.profile.home.a.a public final void ay() { super.ay(); this.ayV.ayZ.add(this.azp); KSImageLoader.loadCircleIcon(this.xX, this.ayV.ayR.mAdTemplate.photoInfo.authorInfo.authorIcon, getContext().getResources().getDrawable(R.drawable.ksad_profile_author_icon)); GradientDrawable gradientDrawable = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[]{-1081180, -2135706957}); final String dq = com.kwad.sdk.core.network.idc.a.MK().dq("https://js-ad.a.yximgs.com/kos/nlav10933/ksad_profile_header_bg.png"); ((f) com.kwad.sdk.glide.c.i(this.ayV.ayX).eC(dq).f(gradientDrawable)).b(new com.kwad.sdk.glide.request.a<Drawable>() { /* class com.kwad.components.ct.profile.home.b.c.AnonymousClass1 */ @Override // com.kwad.sdk.glide.request.a, com.kwad.sdk.glide.request.h public final boolean a(GlideException glideException) { com.kwad.sdk.core.network.idc.a.MK().a(dq, INet.HostType.CDN, com.kwad.components.core.c.a.f(com.kwad.sdk.glide.request.a.c(glideException))); return false; } }).b((ImageView) findViewById(R.id.ksad_profile_header_bg)); } @Override // com.kwad.sdk.mvp.Presenter public final void onCreate() { super.onCreate(); this.xX = (ImageView) findViewById(R.id.ksad_profile_author_icon); this.xY = (TextView) findViewById(R.id.ksad_profile_author_name); this.azn = (TextView) findViewById(R.id.ksad_profile_fans_count); this.azo = (TextView) findViewById(R.id.ksad_profile_follow_count); } @Override // com.kwad.sdk.mvp.Presenter public final void onUnbind() { super.onUnbind(); this.ayV.ayZ.remove(this.azp); } }