package com.bytedance.android.livesdk.usercard;

import X.0CH;
import X.0HH;
import X.0Ul;
import X.0b0;
import X.0b2;
import X.0c0;
import X.0cm;
import X.0hw;
import X.0i1;
import X.0i5;
import X.0if;
import X.0zt;
import X.104;
import X.105;
import X.106;
import X.1JF;
import X.1Lt;
import X.1Ol;
import X.1Om;
import X.1sU;
import X.29t;
import X.29z;
import X.2A0;
import X.2AY;
import X.2AZ;
import X.2Ad;
import X.2Cu;
import X.2DA;
import X.2K7;
import X.2fU;
import X.2n5;
import X.3Bf;
import X.86a;
import X.C1006FuB;
import X.C1287Fyi;
import X.C1290Fyl;
import X.C1313Fz8;
import X.C1393G1a;
import X.C1751GEu;
import X.C2372Gb7;
import X.C2402Gbb;
import X.C2675Gg0;
import X.C2677Gg2;
import X.C2678Gg3;
import X.C2679Gg4;
import X.C2736Ggz;
import X.C2772GhZ;
import X.C2820GiL;
import X.C2849Gio;
import X.C2911Gjo;
import X.C2914Gjr;
import X.C2920Gjx;
import X.C2921Gjy;
import X.C2923Gk0;
import X.C2927Gk4;
import X.C2928Gk5;
import X.C2929Gk6;
import X.C2930Gk7;
import X.C2932Gk9;
import X.C2934GkB;
import X.C2936GkD;
import X.C2937GkE;
import X.C2938GkF;
import X.C2948GkP;
import X.C2949GkQ;
import X.C2952GkT;
import X.C2953GkU;
import X.C2954GkV;
import X.C2955GkW;
import X.C2956GkX;
import X.C2957GkY;
import X.C2989Gl4;
import X.C3028Glh;
import X.C3034Gln;
import X.C3040Glt;
import X.C3087Gme;
import X.C3245GpC;
import X.C3278Gpj;
import X.C3318GqN;
import X.C3332Gqb;
import X.C3394Grb;
import X.C3398Grf;
import X.C3441GsM;
import X.C3491GtA;
import X.C4100H7d;
import X.C4366HHj;
import X.Cih;
import X.DEF;
import X.GAX;
import X.GLF;
import X.GYB;
import X.HEP;
import X.HEY;
import X.HFH;
import X.HFX;
import X.HGF;
import X.HK2;
import X.HK3;
import X.Pm5;
import X.SRf;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.app.Activity;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.bytedance.android.live.actionhandler.IActionHandlerService;
import com.bytedance.android.live.base.model.user.BadgeStruct;
import com.bytedance.android.live.base.model.user.PrivilegeLogExtra;
import com.bytedance.android.live.base.model.user.User;
import com.bytedance.android.live.liveinteract.api.IInteractService;
import com.bytedance.android.livesdk.api.revenue.subscription.ISubscribeService;
import com.bytedance.android.livesdk.event.UserProfileEvent;
import com.bytedance.android.livesdk.livesetting.publicscreen.LiveEnableBadgeOptimize;
import com.bytedance.android.livesdk.livesetting.roomfunction.LiveUserCardInviteGuestOpti;
import com.bytedance.android.livesdk.model.message.TeamUsersInfo;
import com.bytedance.android.livesdk.rank.api.IRankService;
import com.bytedance.android.livesdk.ui.BaseFragment;
import com.bytedance.android.livesdkapi.depend.model.live.Room;
import com.bytedance.android.livesdkapi.session.EnterRoomConfig;
import com.bytedance.android.livesdkapi.session.EnterRoomLinkSession;
import com.bytedance.android.livesdkapi.session.Event;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.bytedance.ies.sdk.datachannel.DataChannel;
import com.bytedance.ies.sdk.datachannel.DataChannelGlobal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.json.JSONException;
import org.json.JSONObject;

public class LiveProfileDetailFragment extends BaseFragment implements View.OnClickListener, C2948GkP {
    public ImageView LIZ;
    public 1sU LIZIZ;
    public 1sU LIZJ;
    public 1sU LIZLLL;
    public Activity LJ;
    public DataChannel LJFF;
    public View LJI;
    public View LJII;
    public 1sU LJIIIIZZ;
    public View LJIIIZ;
    public User LJIIJ;
    public int LJIIJJI;
    public boolean LJIIL;
    public long LJIILIIL;
    public Room LJIILJJIL;
    public long LJIILL;
    public C2914Gjr LJIILLIIL;
    public boolean LJIIZILJ;
    public C2938GkF LJIJ;
    public int LJIJI;
    public String LJIJJ;
    public boolean LJIJJLI;
    public boolean LJIL;
    public long LJJ;
    public Map<String, String> LJJI;
    public Map<String, String> LJJIFFI;
    public UserProfileEvent LJJII;
    public String LJJIII;
    public C2911Gjo LJJIIJ;
    public boolean LJJIIJZLJL;
    public TextView LJJIIZ;
    public TextView LJJIIZI;
    public TextView LJJIJ;
    public TextView LJJIJIIJI;
    public TextView LJJIJIIJIL;
    public TextView LJJIJIL;
    public TextView LJJIJL;
    public View LJJIJLIJ;
    public FrameLayout LJJIL;
    public LinearLayout LJJIZ;
    public ViewGroup LJJJ;
    public 1sU LJJJI;
    public 1sU LJJJIL;
    public 1sU LJJJJ;
    public 3Bf LJJJJI;
    public View LJJJJIZL;
    public 105 LJJJJJ;
    public 106 LJJJJJL;
    public TextView LJJJJL;
    public final Animator[] LJJJJLI = {null, null};
    public final Animator[] LJJJJLL = {null, null};
    public boolean LJJJJZ;
    public boolean LJJJJZI;
    public boolean LJJJLIIL;
    public boolean LJJJLL;
    public boolean LJJJLZIJ;
    public int[] LJJJZ = {2131365093, 2131367122, 2131362435, 2131373089, 2131370809};
    public ValueAnimator LJJL;

    static {
        Covode.recordClassIndex(21133);
    }

    /*  JADX ERROR: JadxRuntimeException in pass: IfRegionVisitor
        jadx.core.utils.exceptions.JadxRuntimeException: Don't wrap MOVE or CONST insns: 0x0004: MOVE  (r5v0 com.bytedance.android.live.base.model.user.User) = (r16v0 com.bytedance.android.live.base.model.user.User)
        	at jadx.core.dex.instructions.args.InsnArg.wrapArg(InsnArg.java:164)
        	at jadx.core.dex.visitors.shrink.CodeShrinkVisitor.assignInline(CodeShrinkVisitor.java:133)
        	at jadx.core.dex.visitors.shrink.CodeShrinkVisitor.checkInline(CodeShrinkVisitor.java:118)
        	at jadx.core.dex.visitors.shrink.CodeShrinkVisitor.shrinkBlock(CodeShrinkVisitor.java:65)
        	at jadx.core.dex.visitors.shrink.CodeShrinkVisitor.shrinkMethod(CodeShrinkVisitor.java:43)
        	at jadx.core.dex.visitors.regions.TernaryMod.makeTernaryInsn(TernaryMod.java:122)
        	at jadx.core.dex.visitors.regions.TernaryMod.visitRegion(TernaryMod.java:34)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:73)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterative(DepthRegionTraversal.java:27)
        	at jadx.core.dex.visitors.regions.IfRegionVisitor.visit(IfRegionVisitor.java:31)
        */
    public final void LIZ(com.bytedance.android.live.base.model.user.User r16) {
        /*
            r15 = this;
            boolean r0 = r15.LJJJJZI
            if (r0 == 0) goto L_0x0012
            r5 = r16
            if (r5 == 0) goto L_0x0012
            long r3 = r5.getId()
            r1 = 0
            int r0 = (r3 > r1 ? 1 : (r3 == r1 ? 0 : -1))
            if (r0 > 0) goto L_0x0013
        L_0x0012:
            return
        L_0x0013:
            X.Gjr r0 = r15.LJIILLIIL
            if (r0 != 0) goto L_0x0026
            X.Gjr r4 = new X.Gjr
            android.app.Activity r3 = r15.LJ
            com.bytedance.android.livesdkapi.depend.model.live.Room r2 = r15.LJIILJJIL
            long r0 = r5.getId()
            r4.<init>(r3, r2, r0)
            r15.LJIILLIIL = r4
        L_0x0026:
            r15.LJIIJ = r5
            long r0 = r5.getId()
            r15.LJIILIIL = r0
            X.H7d r0 = X.C4100H7d.LIZ()
            X.Glh r0 = r0.LIZIZ()
            long r10 = r0.LIZJ()
            long r1 = r15.LJIILIIL
            r7 = 1
            r5 = 0
            int r0 = (r10 > r1 ? 1 : (r10 == r1 ? 0 : -1))
            if (r0 != 0) goto L_0x01e2
            r0 = 1
        L_0x0043:
            r15.LJJJJZ = r0
            android.view.View r0 = r15.LJI
            r0.setVisibility(r5)
            android.view.View r0 = r15.LJII
            r4 = 8
            r0.setVisibility(r4)
            android.view.View r0 = r15.LJIIIZ
            r0.setVisibility(r4)
            boolean r0 = r15.LJIJJLI
            if (r0 == 0) goto L_0x01d9
            boolean r0 = r15.LJJJLL
            if (r0 == 0) goto L_0x0061
            r15.LJFF()
        L_0x0061:
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            long r8 = r0.getOwnerUserId()
            long r0 = r15.LJIILIIL
            r6 = 2
            int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))
            if (r2 != 0) goto L_0x01c3
            r15.LJIIJJI = r5
        L_0x0070:
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            long r1 = r0.getOwnerUserId()
            int r0 = (r10 > r1 ? 1 : (r10 == r1 ? 0 : -1))
            if (r0 != 0) goto L_0x01c0
            r0 = 1
        L_0x007b:
            r15.LJIIL = r0
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            com.bytedance.android.livesdk.model.AuthenticationInfo r0 = r0.getAuthenticationInfo()
            if (r0 != 0) goto L_0x01bc
            r3 = 0
        L_0x0086:
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            long r8 = r0.getOwnerUserId()
            long r0 = r15.LJIILIIL
            int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))
            if (r2 != 0) goto L_0x0117
            if (r3 == 0) goto L_0x0117
            android.widget.ImageView r0 = r15.LIZ
            r0.setVisibility(r5)
            android.widget.ImageView r1 = r15.LIZ
            com.bytedance.android.livesdk.usercard.LiveProfileDetailFragment$1 r0 = new com.bytedance.android.livesdk.usercard.LiveProfileDetailFragment$1
            r0.<init>()
            X.0bc.LIZ(r1, r3, r5, r0)
            java.util.HashMap r2 = new java.util.HashMap
            r2.<init>()
            long r0 = r15.LJIILIIL
            java.lang.String r1 = java.lang.String.valueOf(r0)
            java.lang.String r0 = "anchor_id"
            r2.put(r0, r1)
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            java.lang.String r1 = r0.getIdStr()
            java.lang.String r0 = "room_id"
            r2.put(r0, r1)
            java.lang.String r1 = "show_type"
            java.lang.String r0 = "data_card_anchor"
            r2.put(r1, r0)
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            X.GIv r0 = r0.getStreamType()
            java.lang.String r1 = r0.logStreamingType
            java.lang.String r0 = "live_type"
            r2.put(r0, r1)
            X.Gbb r0 = X.C2402Gbb.LIZ
            java.lang.String r1 = r0.LIZ()
            java.lang.String r0 = "enter_from_merge"
            r2.put(r0, r1)
            X.Gbb r0 = X.C2402Gbb.LIZ
            java.lang.String r1 = r0.LIZLLL()
            java.lang.String r0 = "enter_method"
            r2.put(r0, r1)
            java.lang.String r1 = "action_type"
            java.lang.String r0 = "click"
            r2.put(r1, r0)
            X.H7d r0 = X.C4100H7d.LIZ()
            X.Glh r0 = r0.LIZIZ()
            X.0Uo r1 = r0.LIZ()
            boolean r0 = r15.LJIIL
            if (r0 == 0) goto L_0x01a6
            java.lang.String r1 = "anchor"
        L_0x0101:
            java.lang.String r0 = "admin_type"
            r2.put(r0, r1)
            X.GtO r1 = X.C3491GtA.LJFF
            java.lang.String r0 = "livesdk_authentication_icon_show"
            X.GtA r0 = r1.LIZ(r0)
            r0.LIZ()
            r0.LIZ((java.util.Map<java.lang.String, java.lang.String>) r2)
            r0.LIZLLL()
        L_0x0117:
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.util.List r0 = r0.getBadgeList()
            if (r0 == 0) goto L_0x01e5
            boolean r0 = com.bytedance.android.livesdk.livesetting.publicscreen.LiveEnableBadgeOptimize.getValue()
            if (r0 == 0) goto L_0x0184
            X.106 r2 = r15.LJJJJJL
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r15.LJFF
            java.lang.Class<X.HFX> r0 = X.HFX.class
            java.lang.Object r0 = r1.LIZIZ(r0)
            java.lang.Boolean r0 = (java.lang.Boolean) r0
            boolean r0 = r0.booleanValue()
            r7 = r7 ^ r0
            r2.setDarkMode(r7)
            X.106 r1 = r15.LJJJJJL
            r0 = 3
            r1.setMaxLine(r0)
            X.106 r2 = r15.LJJJJJL
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.util.List r1 = r0.getBadgeList()
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            r2.LIZ(r1, r0)
            X.106 r1 = r15.LJJJJJL
            X.GkR r0 = new X.GkR
            r0.<init>(r15)
            r1.setOnBadgeClickListener(r0)
            X.106 r0 = r15.LJJJJJL
            r0.setVisibility(r5)
            X.105 r0 = r15.LJJJJJ
            r0.setVisibility(r4)
        L_0x0160:
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.util.List r0 = r0.getBadgeList()
            java.util.Iterator r2 = r0.iterator()
        L_0x016a:
            boolean r0 = r2.hasNext()
            if (r0 == 0) goto L_0x01e5
            java.lang.Object r1 = r2.next()
            com.bytedance.android.live.base.model.user.BadgeStruct r1 = (com.bytedance.android.live.base.model.user.BadgeStruct) r1
            boolean r0 = r15.LIZ((com.bytedance.android.live.base.model.user.BadgeStruct) r1)
            if (r0 == 0) goto L_0x016a
            com.bytedance.android.live.base.model.user.PrivilegeLogExtra r1 = r1.LJIIIZ
            java.lang.String r0 = "livesdk_top_active_user_rank_bagde_show"
            r15.LIZ((java.lang.String) r0, (com.bytedance.android.live.base.model.user.PrivilegeLogExtra) r1)
            goto L_0x016a
        L_0x0184:
            X.105 r2 = r15.LJJJJJ
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.util.List r1 = r0.getBadgeList()
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            r2.LIZ(r1, r0, r5)
            X.105 r1 = r15.LJJJJJ
            X.GkS r0 = new X.GkS
            r0.<init>(r15)
            r1.setOnBadgeClickListener(r0)
            X.105 r0 = r15.LJJJJJ
            r0.setVisibility(r5)
            X.106 r0 = r15.LJJJJJL
            r0.setVisibility(r4)
            goto L_0x0160
        L_0x01a6:
            com.bytedance.android.livesdk.model.UserAttr r0 = r1.getUserAttr()
            if (r0 == 0) goto L_0x01b8
            com.bytedance.android.livesdk.model.UserAttr r0 = r1.getUserAttr()
            boolean r0 = r0.LIZIZ
            if (r0 == 0) goto L_0x01b8
            java.lang.String r1 = "admin"
            goto L_0x0101
        L_0x01b8:
            java.lang.String r1 = "viewer"
            goto L_0x0101
        L_0x01bc:
            com.bytedance.android.live.base.model.ImageModel r3 = r0.LIZJ
            goto L_0x0086
        L_0x01c0:
            r0 = 0
            goto L_0x007b
        L_0x01c3:
            X.0hy r0 = X.1Ol.LLFII
            X.1Ol r0 = r0.LIZ()
            long r2 = r0.LJFF
            long r0 = r15.LJIILIIL
            int r8 = (r2 > r0 ? 1 : (r2 == r0 ? 0 : -1))
            if (r8 != 0) goto L_0x01d5
            r15.LJIIJJI = r6
            goto L_0x0070
        L_0x01d5:
            r15.LJIIJJI = r7
            goto L_0x0070
        L_0x01d9:
            boolean r0 = r15.LJJJLIIL
            if (r0 == 0) goto L_0x0061
            r15.LIZ()
            goto L_0x0061
        L_0x01e2:
            r0 = 0
            goto L_0x0043
        L_0x01e5:
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.lang.String r1 = X.0Ul.LIZIZ(r0)
            boolean r0 = android.text.TextUtils.isEmpty(r1)
            if (r0 == 0) goto L_0x03d2
            android.widget.TextView r0 = r15.LJJIIZ
            r0.setVisibility(r4)
        L_0x01f6:
            android.widget.TextView r0 = r15.LJJIIZ
            r0.setText(r1)
            r15.LJJIFFI()
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.lang.String r1 = X.0Ul.LIZJ(r0)
            boolean r0 = android.text.TextUtils.isEmpty(r1)
            if (r0 == 0) goto L_0x03c6
            android.widget.TextView r0 = r15.LJJIIZI
            r0.setVisibility(r4)
        L_0x020f:
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            boolean r0 = r0.isVerified()
            if (r0 == 0) goto L_0x03bf
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.lang.String r0 = r0.getVerifiedReason()
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 != 0) goto L_0x03bf
            android.widget.TextView r1 = r15.LJJIJ
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.lang.String r0 = r0.getVerifiedReason()
            r1.setText(r0)
            android.widget.TextView r0 = r15.LJJIJ
            r0.setVisibility(r5)
        L_0x0233:
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.lang.String r0 = r0.getAutoGraph()
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            if (r0 == 0) goto L_0x03b2
            android.widget.TextView r1 = r15.LJJIJIIJI
            r0 = 2131833776(0x7f1133b0, float:1.9300644E38)
            r1.setText(r0)
        L_0x0247:
            android.widget.TextView r0 = r15.LJJIJIIJI
            r0.setMaxLines(r6)
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            com.bytedance.android.live.base.model.user.FollowInfo r8 = r0.getFollowInfo()
            java.lang.String r1 = "0"
            if (r8 == 0) goto L_0x03a6
            android.widget.TextView r7 = r15.LJJIJIIJIL
            long r2 = r8.getFollowingCount()
            java.lang.String r0 = X.C2296GZt.LIZLLL(r2)
            r7.setText(r0)
            android.widget.TextView r7 = r15.LJJIJIL
            long r2 = r8.getFollowerCount()
            java.lang.String r0 = X.C2296GZt.LIZLLL(r2)
            r7.setText(r0)
            android.widget.TextView r7 = r15.LJJIJIL
            long r2 = r8.getFollowerCount()
            java.lang.String r0 = X.C2296GZt.LIZLLL(r2)
            r7.setText(r0)
        L_0x027d:
            boolean r0 = r15.LJJJJZ
            if (r0 == 0) goto L_0x02fc
            boolean r0 = r15.LJIIL
            if (r0 == 0) goto L_0x02ec
            android.widget.FrameLayout r0 = r15.LJJIL
            r0.setVisibility(r4)
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            boolean r0 = r15.LIZJ(r0)
            if (r0 == 0) goto L_0x02aa
            android.view.View r0 = r15.LJJIJLIJ
            X.C5112HeD.LIZ((android.view.View) r0, (int) r5)
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            com.bytedance.android.live.base.model.user.SubscribeInfo r0 = r0.getSubscribeInfo()
            int r0 = r0.getSubscriberCount()
            java.lang.String r2 = java.lang.Integer.toString(r0)
            android.widget.TextView r0 = r15.LJJIJL
            r0.setText(r2)
        L_0x02aa:
            android.widget.TextView r0 = r15.LJJJJL
            if (r0 == 0) goto L_0x02c9
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            if (r0 == 0) goto L_0x02e6
            com.bytedance.android.livesdk.model.Author r0 = r0.getAuthorInfo()
            if (r0 == 0) goto L_0x02e6
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            com.bytedance.android.livesdk.model.Author r0 = r0.getAuthorInfo()
            long r2 = r0.LIZJ
            android.widget.TextView r1 = r15.LJJJJL
            java.lang.String r0 = X.C2296GZt.LIZLLL(r2)
            r1.setText(r0)
        L_0x02c9:
            r15.LJIIZILJ()
            long r1 = r15.LJIILIIL
            boolean r3 = r15.LJJJJZ
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            com.bytedance.android.live.base.model.user.FollowInfo r0 = r0.getFollowInfo()
            long r4 = r0.getFollowStatus()
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            java.lang.String r6 = r0.getIdStr()
            r0 = r15
            X.GM4.LIZ(r0, r1, r3, r4, r6)
            goto L_0x0012
        L_0x02e6:
            android.widget.TextView r0 = r15.LJJJJL
            r0.setText(r1)
            goto L_0x02c9
        L_0x02ec:
            X.1sU r0 = r15.LIZIZ
            r0.setVisibility(r4)
            X.1sU r0 = r15.LJJJI
            r0.setVisibility(r4)
            android.widget.FrameLayout r0 = r15.LJJIL
            r0.setVisibility(r4)
            goto L_0x02aa
        L_0x02fc:
            boolean r0 = r15.LJIIIZ()
            if (r0 == 0) goto L_0x0398
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            r15.LIZ((com.bytedance.android.live.base.model.user.User) r0, (boolean) r5)
        L_0x0307:
            r15.LJIIIIZZ()
            X.1sU r0 = r15.LIZIZ
            r0.setOnClickListener(r15)
            boolean r0 = r15.LJIILLIIL()
            if (r0 != 0) goto L_0x0392
            boolean r0 = r15.LJIILL()
            if (r0 != 0) goto L_0x0392
            int r0 = r15.LJIJI
            if (r0 == r6) goto L_0x0392
            X.1sU r0 = r15.LJJJI
            r0.setVisibility(r5)
            X.1sU r0 = r15.LJJJI
            r0.setOnClickListener(r15)
        L_0x0329:
            boolean r0 = r15.LJIIL
            if (r0 != 0) goto L_0x038c
            boolean r0 = r15.LJIILLIIL()
            if (r0 != 0) goto L_0x0339
            boolean r0 = r15.LJIILL()
            if (r0 == 0) goto L_0x0386
        L_0x0339:
            X.1sU r0 = r15.LJJJI
            X.C5112HeD.LIZ((android.view.View) r0, (int) r4)
            X.1sU r0 = r15.LJJJIL
            X.C5112HeD.LIZ((android.view.View) r0, (int) r4)
            X.1sU r0 = r15.LJJJJ
            X.C5112HeD.LIZ((android.view.View) r0, (int) r5)
            X.1sU r0 = r15.LJJJJ
            r0.setOnClickListener(r15)
            r15.LJIJI()
        L_0x0350:
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            com.bytedance.android.livesdk.model.OfficialChannelInfo r0 = r0.officialChannelInfo
            if (r0 == 0) goto L_0x0383
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            com.bytedance.android.livesdk.model.OfficialChannelInfo r0 = r0.officialChannelInfo
            com.bytedance.android.live.base.model.user.User r0 = r0.LIZ
            if (r0 == 0) goto L_0x0383
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            com.bytedance.android.livesdk.model.OfficialChannelInfo r0 = r0.officialChannelInfo
            com.bytedance.android.live.base.model.user.User r0 = r0.LIZ
            long r13 = r0.getId()
        L_0x0368:
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r15.LJIILJJIL
            long r6 = r0.getOwnerUserId()
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            long r8 = r0.getId()
            java.lang.String r12 = r15.LJJIII
            boolean r0 = X.C2931Gk8.LIZ(r6, r8, r10, r12, r13)
            if (r0 == 0) goto L_0x039f
            android.widget.FrameLayout r0 = r15.LJJIL
            r0.setVisibility(r4)
            goto L_0x02aa
        L_0x0383:
            r13 = -1
            goto L_0x0368
        L_0x0386:
            X.1sU r0 = r15.LJJJJ
            X.C5112HeD.LIZ((android.view.View) r0, (int) r4)
            goto L_0x0350
        L_0x038c:
            X.1sU r0 = r15.LJJJJ
            X.C5112HeD.LIZ((android.view.View) r0, (int) r4)
            goto L_0x0350
        L_0x0392:
            X.1sU r0 = r15.LJJJI
            r0.setVisibility(r4)
            goto L_0x0329
        L_0x0398:
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            r15.LIZIZ((com.bytedance.android.live.base.model.user.User) r0)
            goto L_0x0307
        L_0x039f:
            android.widget.FrameLayout r0 = r15.LJJIL
            r0.setVisibility(r5)
            goto L_0x02aa
        L_0x03a6:
            android.widget.TextView r0 = r15.LJJIJIIJIL
            r0.setText(r1)
            android.widget.TextView r0 = r15.LJJIJIL
            r0.setText(r1)
            goto L_0x027d
        L_0x03b2:
            android.widget.TextView r1 = r15.LJJIJIIJI
            com.bytedance.android.live.base.model.user.User r0 = r15.LJIIJ
            java.lang.String r0 = r0.getAutoGraph()
            r1.setText(r0)
            goto L_0x0247
        L_0x03bf:
            android.widget.TextView r0 = r15.LJJIJ
            r0.setVisibility(r4)
            goto L_0x0233
        L_0x03c6:
            android.widget.TextView r0 = r15.LJJIIZI
            r0.setText(r1)
            android.widget.TextView r0 = r15.LJJIIZI
            r0.setVisibility(r5)
            goto L_0x020f
        L_0x03d2:
            android.widget.TextView r0 = r15.LJJIIZ
            r0.setText(r1)
            android.widget.TextView r0 = r15.LJJIIZ
            r0.setVisibility(r5)
            goto L_0x01f6
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.usercard.LiveProfileDetailFragment.LIZ(com.bytedance.android.live.base.model.user.User):void");
    }

    public final void LIZ(String str) {
        if (this.LIZJ.getVisibility() == 0 && this.LJFF != null) {
            this.LJFF.LIZJ(2AZ.class, new 0i5(this.LJIILIIL, this.LJJIIJZLJL, LJIIJJI(), LJIIL(), str, LJJ() ? "abnormal" : "normal"));
        }
    }

    public final void LIZ(C3040Glt glt) {
        User user;
        if (this.LJJJJZI && (user = this.LJIIJ) != null && user.getFollowInfo() != null && ((int) this.LJIIJ.getFollowInfo().getFollowStatus()) != glt.LIZ()) {
            C2675Gg0.LIZ().LIZ((Object) new C2956GkX(glt));
        }
    }

    public final void LIZ(Throwable th) {
        if (this.LJJJJZI) {
            if (th instanceof 1JF) {
                C1313Fz8.LIZ(0b0.LJ(), ((1JF) th).getPrompt(), 0);
                return;
            }
            C1313Fz8.LIZ(0b0.LJ(), 2131833994);
        }
    }

    public static boolean LJIJJLI() {
        try {
            return 2K7.LIZ.LIZJ();
        } catch (Exception unused) {
            return false;
        }
    }

    public final boolean LJII() {
        User user = this.LJIIJ;
        if (user == null || user.getSecret() != 1) {
            return false;
        }
        return true;
    }

    private boolean LJIIIZ() {
        if (LiveUserCardInviteGuestOpti.INSTANCE.getValue() != 1 || !this.LJIIL || !this.LJIIZILJ) {
            return false;
        }
        return true;
    }

    private boolean LJIILL() {
        User user = this.LJIIJ;
        if (user != null && this.LJIL && this.LJJ == user.getId()) {
            return true;
        }
        return false;
    }

    private boolean LJIILLIIL() {
        if (this.LJIIJ != null && !this.LJIL && 1Ol.LLFII.LIZ().LJFF == this.LJIIJ.getId()) {
            return true;
        }
        return false;
    }

    private boolean LJJ() {
        if (!LJIL() || this.LIZJ.getVisibility() != 0) {
            return false;
        }
        return true;
    }

    private boolean LJJI() {
        if (this.LIZJ.getVisibility() == 0 || this.LIZLLL.getVisibility() == 0) {
            return true;
        }
        return false;
    }

    private boolean LJIIJJI() {
        User user = this.LJIIJ;
        if (user == null || user.getFollowInfo() == null) {
            return false;
        }
        if (this.LJIIJ.getFollowInfo().getFollowStatus() == 2 || this.LJIIJ.getFollowInfo().getFollowStatus() == 3) {
            return true;
        }
        return false;
    }

    private boolean LJIIL() {
        User user = this.LJIIJ;
        if (user == null || user.getFollowInfo() == null) {
            return false;
        }
        if (this.LJIIJ.getFollowInfo().getFollowStatus() == 2 || this.LJIIJ.getFollowInfo().getFollowStatus() == 1) {
            return true;
        }
        return false;
    }

    private void LJIILJJIL() {
        LIZ(this.LIZIZ);
        1sU r0 = this.LIZJ;
        if (r0 != null) {
            r0.setVisibility(0);
            this.LIZJ.setIcon(2131235138);
            if (1Ol.LLFII.LIZ().LIZJ() == 0if.INVITING) {
                this.LIZJ.setEnabled(false);
            }
        }
    }

    private boolean LJIL() {
        C2930Gk7 LIZIZ2 = C2921Gjy.LIZIZ(this.LJIIJ, this.LJIIZILJ);
        if (LJIIIZ()) {
            if (LIZIZ2 == C2930Gk7.GRAYED || (LIZIZ2 != C2930Gk7.GONE && (!this.LJJIIJZLJL || C2921Gjy.LIZ() || LJII()))) {
                return true;
            }
            return false;
        } else if (LIZIZ2 == C2930Gk7.GRAYED) {
            return true;
        } else {
            return false;
        }
    }

    public final void LIZIZ() {
        DataChannel dataChannel = this.LJFF;
        if (dataChannel != null) {
            dataChannel.LIZJ(29z.class, new C2957GkY(this.LJIIJ, "user_profile"));
        }
    }

    public final void LIZJ() {
        DataChannel dataChannel = this.LJFF;
        if (dataChannel != null) {
            dataChannel.LIZJ(2A0.class, new 2n5(this.LJIIJ, "kickout_with_profile"));
            C2938GkF gkF = this.LJIJ;
            if (gkF != null) {
                gkF.LJFF();
            }
        }
    }

    private boolean LJIJJ() {
        if (this.LJIIJ.getBadgeList() != null && this.LJIIJ.getBadgeList().size() > 0) {
            for (BadgeStruct badgeStruct : this.LJIIJ.getBadgeList()) {
                if (badgeStruct.LIZJ == 6 && badgeStruct.LIZ == 1 && badgeStruct.LIZLLL != null && badgeStruct.LIZLLL.LIZIZ != null && badgeStruct.LIZLLL.LIZIZ.getImageType() == 31) {
                    return true;
                }
                if (LiveEnableBadgeOptimize.getValue() && badgeStruct.LJI != null && badgeStruct.LJI.LIZIZ != null && badgeStruct.LJI.LIZIZ.getImageType() == 31) {
                    return true;
                }
            }
        }
        return false;
    }

    public final void LIZLLL() {
        if (LJIIIZ()) {
            User user = this.LJIIJ;
            if (user == null) {
                this.LJJJLIIL = true;
                return;
            }
            C2930Gk7 LIZIZ2 = C2921Gjy.LIZIZ(user, this.LJIIZILJ);
            if (LIZIZ2 == C2930Gk7.DISCONNECTED) {
                this.LIZJ.setVisibility(8);
                this.LIZLLL.setVisibility(0);
                this.LIZLLL.setOnClickListener(new C1287Fyi(this));
            } else if (LIZIZ2 == C2930Gk7.ACTIVE || LJIL()) {
                this.LIZJ.setVisibility(0);
                this.LIZJ.setOnClickListener(new C2953GkU(this));
                this.LIZLLL.setVisibility(8);
            } else {
                this.LIZJ.setVisibility(8);
            }
            LIZ(this.LJIIJ, false);
            LIZ("show");
        }
    }

    public final void LJ() {
        LIZ("click");
        if (C2921Gjy.LIZ()) {
            C1313Fz8.LIZ(0b0.LJ(), 2131829326);
        } else if (LJII()) {
            C1313Fz8.LIZ(0b0.LJ(), 0b0.LIZ(2131829295, new Object[]{0Ul.LIZ(this.LJIIJ)}), 0);
        } else if (!this.LJJIIJZLJL) {
            C1313Fz8.LIZ(0b0.LJ(), 2131829010);
        } else {
            LIZIZ();
        }
    }

    public final void LJFF() {
        if (this.LJIIJ == null) {
            this.LJJJLL = true;
        } else if (this.LJIJJLI && this.LJIILL > 0) {
            if (this.LJIL) {
                LJIILIIL();
            } else {
                LJIILJJIL();
            }
            1sU r0 = this.LIZJ;
            if (r0 != null) {
                if (r0.getVisibility() == 0 && !this.LJJJLZIJ) {
                    this.LJJJLZIJ = true;
                    String str = 0hw.LJFF;
                    if (1Ol.LLFII.LIZ().LJJLIIIJL != null) {
                        str = 1Ol.LLFII.LIZ().LJJLIIIJL.LIZJ;
                    }
                    DataChannel dataChannel = this.LJFF;
                    if (dataChannel != null) {
                        dataChannel.LIZJ(2Ad.class, str);
                    }
                }
                this.LIZJ.setOnClickListener(new C2923Gk0(this));
            }
        }
    }

    public final void LJI() {
        this.LIZIZ.setText("");
        this.LIZIZ.LIZ(2131886867);
        if (this.LJIIJ.getFollowInfo().getFollowStatus() == 2) {
            this.LIZIZ.setIcon(2131235141);
        } else if (this.LJIIJ.getFollowInfo().getFollowStatus() == 1) {
            this.LIZIZ.setIcon(2131235140);
        }
    }

    public void onDestroy() {
        super.onDestroy();
        DataChannel dataChannel = this.LJFF;
        if (dataChannel != null) {
            dataChannel.LIZJ(2DA.class, false);
        }
        this.LJJJJZI = false;
        LIZ(this.LJJJJLI[0]);
        LIZ(this.LJJJJLI[1]);
        LIZ(this.LJJJJLL[0]);
        LIZ(this.LJJJJLL[1]);
        DataChannelGlobal.LIZLLL.LIZIZ((Object) this);
        ValueAnimator valueAnimator = this.LJJL;
        if (valueAnimator != null) {
            valueAnimator.removeAllUpdateListeners();
            ValueAnimator valueAnimator2 = this.LJJL;
            if (!Cih.LIZ.LIZ()) {
                valueAnimator2.removeAllListeners();
            } else {
                System.err.println(Log.getStackTraceString(new Exception()));
                valueAnimator2.removeAllListeners();
            }
            this.LJJL.cancel();
        }
    }

    private void LJIIJ() {
        String str;
        UserProfileEvent userProfileEvent;
        if (this.LJIILJJIL != null) {
            HashMap hashMap = new HashMap();
            hashMap.put("target_uid", String.valueOf(this.LJIILIIL));
            hashMap.put("sec_target_uid", C4100H7d.LIZ().LIZIZ().LIZ(this.LJIILIIL));
            hashMap.put("packed_level", "2");
            hashMap.put("current_room_id", String.valueOf(this.LJIILJJIL.getId()));
            hashMap.put("request_from", "live_push_settings");
            if (this.LJIILJJIL.getOwner() != null) {
                str = String.valueOf(this.LJIILJJIL.getOwner().getId());
            } else {
                str = "0";
            }
            hashMap.put("anchor_id", str);
            hashMap.put("sec_anchor_id", C4100H7d.LIZ().LIZIZ().LIZ(this.LJIILJJIL.getOwnerUserId()));
            C2938GkF gkF = this.LJIJ;
            if (gkF != null) {
                gkF.LIZ((HashMap<String, String>) hashMap);
                int currentLinkMode = 0cm.LIZ(IInteractService.class).getCurrentLinkMode();
                UserProfileEvent userProfileEvent2 = this.LJJII;
                if (userProfileEvent2 == null || !userProfileEvent2.coHostEnable) {
                    if (this.LJIIL && 0i1.LIZ(currentLinkMode, 2) && (userProfileEvent = this.LJJII) != null && userProfileEvent.linkInRoomEnable) {
                        this.LJIJ.LIZ(this.LJIILJJIL, this.LJIILIIL);
                    }
                } else if (this.LJIIL) {
                    this.LJIJ.LIZ(this.LJIILJJIL);
                    boolean z = this.LJIL;
                    if (z) {
                        this.LJIJ.LIZ(this.LJIJJLI, z, this.LJIILJJIL.getId(), this.LJIILIIL, this.LJIILL);
                    }
                }
            }
        }
    }

    private void LJIILIIL() {
        long j;
        new JSONObject();
        C2938GkF gkF = this.LJIJ;
        if (gkF != null) {
            j = gkF.LJ - SystemClock.uptimeMillis();
            this.LJIJ.LIZIZ();
        } else {
            j = 0;
        }
        C2938GkF gkF2 = this.LJIJ;
        if (gkF2 == null || !gkF2.LIZJ()) {
            LIZ(1, j);
            LIZ(this.LIZIZ);
            this.LIZJ.setVisibility(0);
            this.LIZJ.setIcon(2131235138);
            return;
        }
        LIZ(0, j);
        if (!this.LJIJ.LIZLLL()) {
            LIZ(this.LIZIZ);
            this.LIZJ.setVisibility(0);
            this.LIZJ.setIcon(2131235138);
            this.LIZJ.setEnabled(false);
            this.LIZJ.LIZ(2131886866);
        } else if (this.LJIIJ.getFollowInfo() == null || this.LJIIJ.getFollowInfo().getFollowStatus() != 2) {
            LIZ(this.LIZIZ);
            this.LIZJ.setVisibility(0);
            this.LIZJ.setIcon(2131235138);
        } else {
            if (this.LJIJ.LJ()) {
                this.LIZJ.setText(2131829129);
            } else {
                this.LIZJ.setText(2131829130);
            }
            this.LIZJ.setIcon((Drawable) null);
            this.LIZJ.setVisibility(0);
        }
    }

    private void LJIIZILJ() {
        int childCount = this.LJJJ.getChildCount();
        View view = null;
        boolean z = false;
        for (int i = 0; i < childCount; i++) {
            View childAt = this.LJJJ.getChildAt(i);
            if ((childAt instanceof TextView) || (childAt instanceof ViewGroup)) {
                if (childAt.getVisibility() == 0) {
                    z = true;
                } else {
                    z = false;
                }
            } else if (z) {
                childAt.setVisibility(0);
                view = childAt;
            } else {
                childAt.setVisibility(8);
            }
        }
        if (view != null) {
            view.setVisibility(8);
        }
        HashSet hashSet = new HashSet();
        for (int i2 : this.LJJJZ) {
            View findViewById = this.LJJJJIZL.findViewById(i2);
            if (findViewById != null && findViewById.getVisibility() == 0) {
                hashSet.add(Integer.valueOf(i2));
            }
        }
        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) this.LIZIZ.getLayoutParams();
        if (hashSet.contains(2131365093)) {
            if (hashSet.size() == 1) {
                layoutParams.setMarginStart(getContext().getResources().getDimensionPixelSize(2131166192));
            } else if (hashSet.size() == 2) {
                layoutParams.setMarginStart(getContext().getResources().getDimensionPixelSize(2131166193));
            } else if (hashSet.contains(2131370809)) {
                int dimensionPixelSize = getContext().getResources().getDimensionPixelSize(2131166193);
                layoutParams.setMarginStart(dimensionPixelSize);
                layoutParams.setMarginEnd(dimensionPixelSize);
            } else {
                int dimensionPixelSize2 = getContext().getResources().getDimensionPixelSize(2131166193);
                int dimensionPixelSize3 = getContext().getResources().getDimensionPixelSize(2131166192);
                layoutParams.setMarginStart(dimensionPixelSize2);
                layoutParams.setMarginEnd(dimensionPixelSize3);
            }
        }
        this.LIZIZ.setLayoutParams(layoutParams);
    }

    private void LJIJI() {
        String str;
        HashMap hashMap = new HashMap();
        hashMap.put("event_belong", "live_view");
        hashMap.put("event_type", "core");
        hashMap.put("event_page", "live_detail");
        hashMap.put("action_type", "click");
        hashMap.put("event_module", "right_anchor");
        hashMap.put("enter_from_merge", "live_detail");
        hashMap.put("enter_method", "right_anchor");
        hashMap.put("anchor_id", String.valueOf(this.LJIIJ.getId()));
        hashMap.put("room_id", String.valueOf(this.LJIIJ.getLiveRoomId()));
        hashMap.put("right_user_id", String.valueOf(this.LJIIJ.getId()));
        hashMap.put("live_type", C1393G1a.LIZ(this.LJIILJJIL.getStreamType()));
        hashMap.put("initial_follow_status", String.valueOf(this.LJIIJ.followStatus));
        if (1Ol.LLFII.LIZ().LJ > 0) {
            hashMap.put("channel_id", String.valueOf(1Ol.LLFII.LIZ().LJ));
            if (1Ol.LLFII.LIZ().LJIIZILJ == 0) {
                str = "anchor";
            } else {
                str = "pk";
            }
            hashMap.put("connection_type", str);
        }
        String LJI2 = C2402Gbb.LIZ.LJI();
        if (TextUtils.isEmpty(LJI2) || !"click_push_live_cd_user".equals(LJI2)) {
            hashMap.put("is_subscribe", "0");
        } else {
            hashMap.put("is_subscribe", "1");
        }
        hashMap.put("is_return", "0");
        C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("live_show");
        LIZ2.LIZ((Map<String, String>) hashMap);
        LIZ2.LIZ(this.LJFF);
        LIZ2.LIZ(new C3441GsM(this.LJFF, "user_live_duration"));
        LIZ2.LIZLLL();
    }

    private void LJIJ() {
        boolean z;
        String str;
        long j;
        String str2;
        boolean z2 = !this.LJIIL;
        boolean LIZ2 = 0i1.LIZ(0cm.LIZ(IInteractService.class).getCurrentLinkMode(), 4);
        if (this.LJIILIIL == 0cm.LIZ(IInteractService.class).getRivalAnchorUidWhenAnchorLinkMic()) {
            z = true;
        } else {
            z = false;
            List multiCoHostLinkedUserList = 0cm.LIZ(IInteractService.class).getMultiCoHostLinkedUserList();
            if (multiCoHostLinkedUserList != null && multiCoHostLinkedUserList.size() > 0) {
                int i = 0;
                while (true) {
                    if (i >= multiCoHostLinkedUserList.size()) {
                        break;
                    } else if (((Long) multiCoHostLinkedUserList.get(i)).longValue() == this.LJIILIIL) {
                        z = true;
                        break;
                    } else {
                        i++;
                    }
                }
            }
        }
        if (z2 && LIZ2 && z) {
            List<TeamUsersInfo> list = null;
            long j2 = 0;
            if (0cm.LIZ(IInteractService.class).isRoomInBattle()) {
                j = 0cm.LIZ(IInteractService.class).getBattleId();
                list = 0cm.LIZ(IInteractService.class).getTeamInfo();
                str = "manual_pk";
            } else {
                if (0cm.LIZ(IInteractService.class).isInCoHost()) {
                    str = "anchor";
                } else if (0cm.LIZ(IInteractService.class).isInMultiGuest()) {
                    str = "audience";
                } else {
                    str = "";
                }
                j = 0;
            }
            C3491GtA LIZ3 = C3491GtA.LJFF.LIZ("livesdk_profile_swicth_click");
            LIZ3.LIZ();
            LIZ3.LIZ("to_anchor_id", this.LJIILIIL);
            LIZ3.LIZ("to_room_id", this.LJIIJ.getLiveRoomId());
            LIZ3.LIZ("channel_id", 0cm.LIZ(IInteractService.class).getChannelId());
            LIZ3.LIZ("connection_type", str);
            LIZ3.LIZ("pk_id", j);
            if (0cm.LIZ(IInteractService.class).isInCoHost()) {
                List multiCoHostLinkedUserList2 = 0cm.LIZ(IInteractService.class).getMultiCoHostLinkedUserList();
                if (multiCoHostLinkedUserList2.size() > 2) {
                    str2 = "1";
                } else {
                    str2 = "0";
                }
                LIZ3.LIZ("is_multi", str2);
                if (multiCoHostLinkedUserList2.size() > 2 && list != null) {
                    for (TeamUsersInfo teamUsersInfo : list) {
                        if (teamUsersInfo.LIZIZ != null) {
                            StringBuilder sb = new StringBuilder();
                            for (int i2 = 0; i2 < teamUsersInfo.LIZIZ.size(); i2++) {
                                if (i2 > 0) {
                                    sb.append(",");
                                }
                                sb.append(teamUsersInfo.LIZIZ.get(i2));
                            }
                            if (teamUsersInfo.LIZ == 1) {
                                LIZ3.LIZ("red_team_uid_list", sb.toString());
                            } else {
                                LIZ3.LIZ("blue_team_uid_list", sb.toString());
                            }
                        }
                    }
                }
                if (multiCoHostLinkedUserList2.size() > 0) {
                    LIZ3.LIZ("current_connection_cnts", multiCoHostLinkedUserList2.size());
                    LIZ3.LIZ("uid_list", multiCoHostLinkedUserList2.toString());
                } else {
                    LIZ3.LIZ("current_connection_cnts", "2");
                    if (DataChannelGlobal.LIZLLL.LIZIZ(HEP.class) != null) {
                        j2 = ((Room) DataChannelGlobal.LIZLLL.LIZIZ(HEP.class)).getOwner().getId();
                    }
                    LIZ3.LIZ("uid_list", Arrays.asList(new Long[]{Long.valueOf(this.LJIILIIL), Long.valueOf(j2)}).toString());
                }
            }
            LIZ3.LIZLLL();
        }
    }

    private void LJJIFFI() {
        boolean z;
        boolean z2;
        List<BadgeStruct> badgeList;
        User user;
        User user2 = this.LJIIJ;
        if (user2 == null || user2.getBadgeList() == null || this.LJIIJ.getBadgeList().size() == 0) {
            z = false;
        } else {
            z = true;
        }
        if (this.LJJJJI == null || (user = this.LJIIJ) == null || user.getComboBadgeInfo() == null || !0cm.LIZ(IRankService.class).isRankEnabled(C3245GpC.WEEKLY_RANK.getType())) {
            z2 = false;
            if (!z) {
                this.LJJIZ.setVisibility(8);
                return;
            }
        } else {
            z2 = true;
        }
        this.LJJIZ.setVisibility(0);
        if (z2) {
            this.LJJJJI.setVisibility(0);
            this.LJJJJI.LIZ(this.LJIIJ.getComboBadgeInfo().LIZ, (int) this.LJIIJ.getComboBadgeInfo().LIZIZ);
        }
        if (z && (badgeList = this.LJIIJ.getBadgeList()) != null) {
            for (BadgeStruct badgeStruct : badgeList) {
                if (badgeStruct.LIZJ == 4) {
                    Boolean bool = (Boolean) this.LJFF.LIZIZ(HFH.class);
                    if (bool == null || !bool.booleanValue()) {
                        this.LJFF.LIZ(HFH.class, true);
                        C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("livesdk_privilege_badge_show");
                        LIZ2.LIZ("anchor_id", this.LJIILJJIL.getOwnerUserId());
                        LIZ2.LIZ("room_id", this.LJIILJJIL.getId());
                        LIZ2.LIZ("enter_from_merge", C2402Gbb.LIZ.LIZ());
                        LIZ2.LIZ("enter_method", C2402Gbb.LIZ.LIZLLL());
                        LIZ2.LJI("click");
                        LIZ2.LIZ("request_id", C2402Gbb.LIZ.LJIIJ());
                        LIZ2.LIZ("video_id", C2402Gbb.LIZ.LJFF());
                        LIZ2.LIZ("show_entrance", "personal_profile");
                        LIZ2.LIZLLL();
                        return;
                    }
                    return;
                }
            }
        }
    }

    public final void LJIIIIZZ() {
        String str;
        if (this.LJIIJ != null && LIZJ(this.LJIILJJIL.getOwner()) && this.LJIIJ.getId() == this.LJIILJJIL.getOwnerUserId()) {
            if (this.LJIILJJIL.getOwner().getFollowInfo().getFollowStatus() == 1 || this.LJIILJJIL.getOwner().getFollowInfo().getFollowStatus() == 2 || this.LJIILJJIL.getOwner().getSubscribeInfo().isSubscribed()) {
                this.LIZIZ.LIZ(2131886867);
                if (this.LJIIJ.getFollowInfo().getFollowStatus() == 2) {
                    this.LIZIZ.setIcon(2131235141);
                } else if (this.LJIIJ.getFollowInfo().getFollowStatus() == 1) {
                    this.LIZIZ.setIcon(2131235140);
                } else {
                    this.LIZIZ.setIcon(2131235139);
                }
                this.LIZIZ.setText((CharSequence) null);
                this.LJJJIL.setVisibility(0);
                this.LJJJIL.setOnClickListener(this);
                LJJIFFI();
                if (LIZLLL(this.LJIILJJIL.getOwner())) {
                    this.LJJJIL.setText(2131830481);
                    this.LJJJIL.LIZ(2131886867);
                }
                C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("livesdk_subscribe_icon_show");
                LIZ2.LIZ("anchor_id", this.LJIILJJIL.getOwnerUserId());
                LIZ2.LIZ("room_id", this.LJIILJJIL.getId());
                LIZ2.LIZ("enter_from_merge", C2402Gbb.LIZ.LIZ());
                LIZ2.LIZ("enter_method", C2402Gbb.LIZ.LIZLLL());
                LIZ2.LJI("click");
                LIZ2.LIZ("request_id", C2402Gbb.LIZ.LJIIJ());
                LIZ2.LIZ("video_id", C2402Gbb.LIZ.LJFF());
                LIZ2.LIZ("show_entrance", "profile_card");
                if (this.LJIIL) {
                    str = "anchor";
                } else {
                    str = "user";
                }
                LIZ2.LIZ("user_type", str);
                LIZ2.LIZ(this.LJFF);
                LIZ2.LIZLLL();
                GLF.LIZIZ("profile_card");
                return;
            }
            this.LIZIZ.setText(2131833997);
            this.LIZIZ.setIcon((Drawable) null);
            this.LIZIZ.LIZ(2131886860);
            LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) this.LIZIZ.getLayoutParams();
            layoutParams.setMarginEnd(getContext().getResources().getDimensionPixelSize(2131166192));
            this.LIZIZ.setLayoutParams(layoutParams);
            this.LJJJIL.setVisibility(8);
        }
    }

    public final void LIZ() {
        if (this.LJIIJ == null) {
            this.LJJJLIIL = true;
        } else if (LJIIIZ()) {
            LIZLLL();
        } else {
            C2930Gk7 LIZ2 = C2921Gjy.LIZ(this.LJIIJ, this.LJIIZILJ);
            if (LIZ2 == C2930Gk7.ACTIVE) {
                LIZ(this.LIZIZ);
                this.LIZJ.setVisibility(0);
                this.LIZJ.LIZ(2131886867);
                this.LIZJ.setIcon(2131235143);
                this.LIZLLL.setVisibility(8);
                this.LIZJ.setOnClickListener(new C2927Gk4(this));
            } else if (LIZ2 == C2930Gk7.GRAYED) {
                LIZ(this.LIZIZ);
                this.LIZJ.setVisibility(0);
                this.LIZJ.LIZ(2131886866);
                this.LIZJ.setIcon(2131235144);
                this.LIZLLL.setVisibility(8);
                this.LIZJ.setOnClickListener(new C2952GkT(this));
            } else if (LIZ2 == C2930Gk7.DISCONNECTED) {
                LIZ(this.LIZIZ);
                this.LIZJ.setVisibility(8);
                this.LIZLLL.setVisibility(0);
                this.LIZLLL.setOnClickListener(new C1290Fyl(this));
            } else {
                this.LIZJ.setVisibility(8);
            }
            LIZ("show");
        }
    }

    private void LIZ(Animator animator) {
        if (animator != null) {
            LIZIZ(animator);
            if (animator.isRunning()) {
                animator.cancel();
            }
        }
    }

    private void LIZ(1sU r3) {
        if (r3.getVisibility() == 0) {
            r3.setIcon((Drawable) null);
            LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) r3.getLayoutParams();
            layoutParams.weight = 3.1f;
            r3.setLayoutParams(layoutParams);
        }
    }

    public static void LIZIZ(Animator animator) {
        if (!Cih.LIZ.LIZ()) {
            animator.removeAllListeners();
            return;
        }
        System.err.println(Log.getStackTraceString(new Exception()));
        animator.removeAllListeners();
    }

    private boolean LIZJ(User user) {
        if (user == null || user.getSubscribeInfo() == null) {
            return false;
        }
        return user.getSubscribeInfo().isAnchorQualified();
    }

    private boolean LIZLLL(User user) {
        if (!LIZJ(user) || !user.getSubscribeInfo().isSubscribed()) {
            return false;
        }
        return true;
    }

    public void onEvent(C2956GkX gkX) {
        User user;
        if (gkX != null && gkX.LIZ != null) {
            C3040Glt glt = gkX.LIZ;
            if (glt.LIZ == this.LJIILIIL && this.LJJJJZI && (user = this.LJIIJ) != null && user.getFollowInfo() != null && ((int) this.LJIIJ.getFollowInfo().getFollowStatus()) != glt.LIZ()) {
                this.LJIIJ.setFollowStatus(glt.LIZ());
                if (LJIIIZ()) {
                    LIZ(this.LJIIJ, true);
                } else {
                    LIZIZ(this.LJIIJ);
                }
                LJIIIIZZ();
                LJIIZILJ();
            }
        }
    }

    private boolean LIZ(BadgeStruct badgeStruct) {
        if (LiveEnableBadgeOptimize.getValue()) {
            if (badgeStruct.LJI == null || badgeStruct.LJI.LIZIZ == null || badgeStruct.LJI.LIZIZ.getImageType() != 31) {
                return false;
            }
            return true;
        } else if (badgeStruct.LIZJ == 6 && badgeStruct.LIZ == 1 && badgeStruct.LIZLLL != null && badgeStruct.LIZLLL.LIZIZ != null && badgeStruct.LIZLLL.LIZIZ.getImageType() == 31) {
            return true;
        } else {
            return false;
        }
    }

    private void LIZIZ(User user) {
        if (user != null) {
            if (!user.isFollowing()) {
                if (this.LJJJIL.getVisibility() != 0) {
                    this.LIZIZ.LIZ(2131886860);
                    this.LIZIZ.setText(2131833997);
                } else {
                    this.LIZIZ.setIcon(2131235139);
                }
                this.LJIIJ.getFollowInfo().setPushStatus(2);
                return;
            }
            this.LIZIZ.LIZ(2131886867);
            if (this.LJJJIL.getVisibility() != 0) {
                this.LIZIZ.setText(2131833998);
            } else {
                this.LIZIZ.setIcon(2131235140);
            }
            if (user.getFollowInfo() != null && user.getFollowInfo().getFollowStatus() == 2) {
                if (this.LJJJIL.getVisibility() != 0) {
                    this.LIZIZ.setText(2131829396);
                } else {
                    this.LIZIZ.setIcon(2131235141);
                }
            }
        }
    }

    public final /* synthetic */ void LIZ(0zt r9) {
        String str;
        String queryParameter;
        String queryParameter2;
        if (r9 instanceof 104) {
            104 r4 = (104) r9;
            if (!86a.LIZ(r4.LIZJ()) && getContext() != null) {
                String LIZJ2 = r4.LIZJ();
                Uri parse = Uri.parse(LIZJ2);
                String queryParameter3 = parse.getQueryParameter("noble_intercept");
                if (!(queryParameter3 == null || C1751GEu.LIZIZ(queryParameter3) == 0 || (queryParameter = parse.getQueryParameter("url")) == null)) {
                    String uri = Uri.parse(queryParameter).buildUpon().appendQueryParameter("status_bar_height", String.valueOf(0b0.LJ(0b2.LIZ(getContext())))).build().toString();
                    Set<String> queryParameterNames = parse.getQueryParameterNames();
                    Uri.Builder clearQuery = parse.buildUpon().clearQuery();
                    for (String next : queryParameterNames) {
                        if ("url".equals(next)) {
                            queryParameter2 = uri;
                        } else {
                            queryParameter2 = parse.getQueryParameter(next);
                        }
                        clearQuery.appendQueryParameter(next, queryParameter2);
                    }
                    HashMap hashMap = new HashMap();
                    hashMap.put("type", "card");
                    C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("livesdk_nobility_page_click");
                    LIZ2.LIZ((Map<String, String>) hashMap);
                    LIZ2.LIZLLL();
                    LIZJ2 = clearQuery.build().toString();
                }
                if (r4.LIZ().LIZJ == 4) {
                    Uri.parse(LIZJ2);
                    String LIZ3 = C2402Gbb.LIZ.LIZ();
                    String LIZLLL2 = C2402Gbb.LIZ.LIZLLL();
                    C2736Ggz ggz = new C2736Ggz(LIZJ2);
                    ggz.LIZ("sec_anchor_id", this.LJIILJJIL.getOwner().getSecUid());
                    ggz.LIZ("sec_another_user_id", this.LJIIJ.getSecUid());
                    ggz.LIZ("enter_from_merge", LIZ3);
                    ggz.LIZ("enter_method", LIZLLL2);
                    if (!LIZJ2.contains("show_entrance")) {
                        ggz.LIZ("show_entrance", "personal_profile_badge");
                    }
                    String LIZ4 = ggz.LIZ();
                    DataChannel dataChannel = this.LJFF;
                    if (dataChannel == null || dataChannel.LIZIZ(HFX.class) == null || ((Boolean) this.LJFF.LIZIZ(HFX.class)).booleanValue()) {
                        0cm.LIZ(IActionHandlerService.class).handle(getContext(), LIZ4);
                    } else {
                        C2675Gg0.LIZ().LIZ((Object) new C3394Grb("subscribe_badge_".concat(String.valueOf(LIZ4))));
                    }
                    C2938GkF gkF = this.LJIJ;
                    if (gkF != null) {
                        gkF.LJFF();
                    }
                } else {
                    C2736Ggz ggz2 = new C2736Ggz(LIZJ2);
                    BadgeStruct LIZ5 = r4.LIZ();
                    if (LIZ5 != null && LIZ(LIZ5)) {
                        ggz2.LIZ("show_entrance", this.LJJII.mShowEntrance);
                        if (this.LJIIL) {
                            str = "anchor";
                        } else {
                            str = "user";
                        }
                        ggz2.LIZ("user_type", str);
                        ggz2.LIZ("to_user_id", this.LJIILIIL);
                        PrivilegeLogExtra privilegeLogExtra = LIZ5.LJIIIZ;
                        if (privilegeLogExtra != null) {
                            ggz2.LIZ("privilege_id", privilegeLogExtra.LIZIZ);
                            ggz2.LIZ("data_version_id", privilegeLogExtra.LIZ);
                        }
                    }
                    0cm.LIZ(IActionHandlerService.class).handle(getContext(), ggz2.LIZ());
                }
            }
            BadgeStruct LIZ6 = ((104) r9).LIZ();
            if (LIZ6 != null && LIZ(LIZ6)) {
                LIZ("livesdk_top_active_user_rank_bagde_click", LIZ6.LJIIIZ);
            }
        }
    }

    public void onClick(View view) {
        boolean z;
        String str;
        boolean z2;
        long j;
        User user;
        int id = view.getId();
        if (id != 2131365605) {
            String str2 = "right_anchor";
            if (id == 2131365093) {
                if (!C4100H7d.LIZ().LIZIZ().LJ()) {
                    Bundle bundle = new Bundle();
                    bundle.putString("enter_from", "live_detail");
                    bundle.putString("action_type", "follow");
                    bundle.putString("source", "live");
                    bundle.putString("v1_source", "follow");
                    C3028Glh LIZIZ2 = C4100H7d.LIZ().LIZIZ();
                    Activity activity = this.LJ;
                    C2677Gg2 LIZ2 = C2678Gg3.LIZ();
                    LIZ2.LIZ = C3087Gme.LIZ();
                    LIZ2.LIZIZ = C3087Gme.LIZIZ();
                    LIZ2.LJ = "live_detail";
                    LIZ2.LJFF = "follow";
                    LIZ2.LIZLLL = "live";
                    LIZ2.LIZJ = -1;
                    LIZIZ2.LIZ(activity, LIZ2.LIZ()).LIZIZ(new C2372Gb7());
                } else {
                    getContext();
                    if (!LJIJJLI()) {
                        C1313Fz8.LIZ(0b0.LJ(), 2131829752);
                    } else {
                        if (this.LJIIL) {
                            str2 = "live_anchor_c_audience";
                        } else {
                            int i = this.LJIIJJI;
                            if (i == 0) {
                                str2 = "live_audience_c_anchor";
                            } else if (i != 2) {
                                str2 = "live_audience_c_audience";
                            }
                        }
                        boolean LJIJJ2 = LJIJJ();
                        if (this.LJJIFFI == null) {
                            this.LJJIFFI = new HashMap();
                        }
                        this.LJJIFFI.put("to_user_rank", String.valueOf(LJIJJ2));
                        if (this.LJIIL) {
                            this.LJJIFFI.put("from_user_rank", "null");
                        } else if (!(!TextUtils.isEmpty(this.LJJIFFI.get("from_user_rank")) || DataChannelGlobal.LIZLLL.LIZIZ(HEY.class) == null || ((C3318GqN) DataChannelGlobal.LIZLLL.LIZIZ(HEY.class)).LJFF == null)) {
                            Map<String, String> map = this.LJJIFFI;
                            StringBuilder sb = new StringBuilder();
                            sb.append(((C3318GqN) DataChannelGlobal.LIZLLL.LIZIZ(HEY.class)).LJFF.LJJJJLL);
                            map.put("from_user_rank", sb.toString());
                        }
                        if (!TextUtils.isEmpty(this.LJJII.mClickUserPosition)) {
                            this.LJJIFFI.put("click_user_position", this.LJJII.mClickUserPosition);
                        }
                        if (this.LJIILJJIL.getOwnerUserId() == this.LJIILIIL) {
                            this.LJJIFFI.put("to_user_rank", "null");
                        }
                        this.LJIILLIIL.LJ = this.LJJIFFI;
                        if (!this.LJIIJ.isFollowing()) {
                            C2938GkF gkF = this.LJIJ;
                            String requestId = this.LJIILJJIL.getRequestId();
                            long j2 = this.LJIILIIL;
                            long id2 = this.LJIILJJIL.getId();
                            String labels = this.LJIILJJIL.getLabels();
                            if (!gkF.LIZJ) {
                                gkF.LIZJ = true;
                                gkF.LIZ.LIZ(C4100H7d.LIZ().LIZIZ().LIZ(((C3034Gln) new C2989Gl4().LIZ(j2)).LIZ(requestId).LIZIZ("live_detail").LIZJ(str2).LIZIZ(id2).LIZLLL(labels).LIZJ()).LIZ(new C2932Gk9(gkF), new C2934GkB(gkF), new C2955GkW(gkF)));
                            }
                            if (C3278Gpj.LIZ(this.LJFF) && this.LJIILJJIL.getOwner() != null && this.LJIILIIL == this.LJIILJJIL.getOwner().getId()) {
                                HashMap hashMap = new HashMap();
                                hashMap.put("refer", "card_follow_button");
                                HashMap hashMap2 = new HashMap();
                                hashMap2.put("anchor_id", String.valueOf(this.LJIILJJIL.getOwner().getId()));
                                hashMap2.put("room_id", String.valueOf(this.LJIILJJIL.getId()));
                                C3278Gpj.LIZIZ.LIZ("live_ad", "follow", hashMap, hashMap2);
                            }
                            Map<String, String> map2 = this.LJJI;
                            if (map2 != null) {
                                this.LJIILLIIL.LIZLLL = map2;
                            }
                            C2914Gjr gjr = this.LJIILLIIL;
                            long j3 = this.LJIILIIL;
                            String str3 = this.LJIJJ;
                            boolean z3 = this.LJIIL;
                            int i2 = this.LJIIJJI;
                            if (1Ol.LLFII.LIZ().LJFF == this.LJIIJ.getId()) {
                                z2 = true;
                            } else {
                                z2 = false;
                            }
                            if (this.LJIIJ.getFollowInfo() != null) {
                                j = this.LJIIJ.getFollowInfo().getFollowStatus();
                            } else {
                                j = 0;
                            }
                            gjr.LIZ(true, j3, str3, z3, i2, z2, j, this.LJIIZILJ, this.LJJII.mEventPage);
                        } else {
                            HK2 hk2 = new HK2(getContext());
                            hk2.LIZIZ = getContext().getString(2131829531, new Object[]{0Ul.LIZ(this.LJIIJ)});
                            hk2.LIZ(2131829530, (DialogInterface.OnClickListener) new C2920Gjx(this, str2), false);
                            hk2.LIZIZ(2131833718, C2954GkV.LIZ, false);
                            hk2.LJFF = C2679Gg4.LIZ;
                            hk2.LJI = C2820GiL.LIZ;
                            HK3 LIZ3 = hk2.LIZ();
                            LIZ3.show();
                            2fU.LIZ.LIZ(LIZ3);
                        }
                    }
                }
            } else if (id == 2131370809) {
                if (LIZJ(this.LJIILJJIL.getOwner())) {
                    DataChannel dataChannel = this.LJFF;
                    if (dataChannel == null || dataChannel.LIZIZ(HFX.class) == null) {
                        z = true;
                    } else {
                        z = ((Boolean) this.LJFF.LIZIZ(HFX.class)).booleanValue();
                    }
                    C3491GtA LIZ4 = C3491GtA.LJFF.LIZ("livesdk_subscribe_icon_click");
                    LIZ4.LIZ("anchor_id", this.LJIILJJIL.getOwnerUserId());
                    LIZ4.LIZ("room_id", this.LJIILJJIL.getId());
                    LIZ4.LIZ("enter_from_merge", C2402Gbb.LIZ.LIZ());
                    LIZ4.LIZ("enter_method", C2402Gbb.LIZ.LIZLLL());
                    LIZ4.LJI("click");
                    LIZ4.LIZ("request_id", C2402Gbb.LIZ.LJIIJ());
                    LIZ4.LIZ("video_id", C2402Gbb.LIZ.LJFF());
                    LIZ4.LIZ("click_position", "profile_card");
                    if (this.LJIIL) {
                        str = "anchor";
                    } else {
                        str = "user";
                    }
                    LIZ4.LIZ("user_type", str);
                    LIZ4.LIZ(this.LJFF);
                    LIZ4.LIZLLL();
                    GLF.LIZJ("profile_card");
                    if (!z) {
                        C2675Gg0.LIZ().LIZ((Object) new C3394Grb("subscribe_profile_card"));
                    } else {
                        if (LIZLLL(this.LJIILJJIL.getOwner())) {
                            0cm.LIZ(ISubscribeService.class).openUserSubscribeState(this.LJ, this.LJIILJJIL, "profile_card");
                        } else {
                            0cm.LIZ(ISubscribeService.class).openUserSubscribeEntry(this.LJ, this.LJIILJJIL, "profile_card");
                        }
                        C2911Gjo gjo = this.LJJIIJ;
                        if (gjo != null) {
                            gjo.LIZ();
                        }
                    }
                }
            } else if (id == 2131362435) {
                if (!C4100H7d.LIZ().LIZIZ().LIZ(C2849Gio.AT)) {
                    C1006FuB.LIZ(this.LJIILLIIL.LIZ);
                    this.LJIJ.LJFF();
                    Room room = this.LJIILJJIL;
                    if (room == null || room.getOrientation() != 2 || this.LJFF.LIZIZ(HFX.class) == null || ((Boolean) this.LJFF.LIZIZ(HFX.class)).booleanValue()) {
                        C2772GhZ ghZ = new C2772GhZ(1, 0Ul.LIZ(this.LJIIJ), "", false);
                        Room room2 = this.LJIILJJIL;
                        if (room2 == null || this.LJIIJ == null || room2.getOwnerUserId() != this.LJIIJ.getId()) {
                            ghZ.LJFF = "personal_profile";
                        } else {
                            ghZ.LJFF = "anchor_profile";
                        }
                        ghZ.LIZLLL = this.LJIIJ;
                        this.LJFF.LIZ(HGF.class, "profile_card");
                        this.LJFF.LIZJ(29t.class, ghZ);
                    }
                }
            } else if (id == 2131373089) {
                if (this.LJIIJ.isFollowing() || !LJII()) {
                    Event event = new Event("live_profile_click", 34560, C3332Gqb.BussinessApiCall);
                    event.LIZ("click to jump room");
                    GAX.LIZ.LIZ().LIZ(event);
                    EnterRoomConfig enterRoomConfig = new EnterRoomConfig();
                    GAX.LIZ.LIZ(EnterRoomLinkSession.LIZ(enterRoomConfig));
                    enterRoomConfig.LIZJ.LIZJ = str2;
                    enterRoomConfig.LIZLLL.LJJJJI = "live_detail";
                    enterRoomConfig.LIZLLL.LJJJJJ = str2;
                    enterRoomConfig.LIZJ.LJIILIIL = this.LJIILJJIL.getId();
                    enterRoomConfig.LIZJ.LJIILJJIL = (String) this.LJFF.LIZIZ(GYB.class);
                    enterRoomConfig.LIZJ.LIZIZ = String.valueOf(this.LJIIJ.getId());
                    enterRoomConfig.LIZLLL.LJJLI = "live_detail";
                    C2675Gg0.LIZ().LIZ((Object) new C3398Grf(this.LJIIJ.getLiveRoomId(), enterRoomConfig));
                    LJIJ();
                } else {
                    C1313Fz8.LIZ(0b0.LJ(), 2131830147);
                    GAX.LIZ.LIZ().LIZ(new Event("click_secret_user", 3072, C3332Gqb.SdkInterfaceCall));
                    return;
                }
            } else if (id == 2131367001) {
                this.LJII.setVisibility(8);
                this.LJI.setVisibility(8);
                this.LJIIIZ.setVisibility(0);
                LJIIJ();
            }
        } else if (!this.LJIIL && (user = this.LJIIJ) != null) {
            if (((Integer) 1Om.LIZ().LJIILIIL).intValue() == 2) {
                C1313Fz8.LIZ(0b0.LJ(), 2131833944);
            } else {
                int i3 = this.LJIIJJI;
                if (i3 == 0) {
                    C2914Gjr gjr2 = this.LJIILLIIL;
                    user.getId();
                    gjr2.LIZ();
                } else if (i3 == 2) {
                    C2914Gjr gjr3 = this.LJIILLIIL;
                    user.getId();
                    gjr3.LIZ();
                } else {
                    C2914Gjr gjr4 = this.LJIILLIIL;
                    user.getId();
                    gjr4.LIZ();
                }
                String idStr = user.getIdStr();
                C3491GtA LIZ5 = C3491GtA.LJFF.LIZ("livesdk_enter_personal_detail");
                LIZ5.LIZ();
                LIZ5.LIZ("to_user_id", idStr);
                LIZ5.LIZLLL();
                HashMap hashMap3 = new HashMap(1);
                hashMap3.put("log_enter_live_source", this.LJFF.LIZIZ(GYB.class));
                hashMap3.put("sec_user_id", user.getSecUid());
                0cm.LIZ(IActionHandlerService.class).showUserProfile(user.getId(), (String) null, hashMap3);
            }
        } else {
            return;
        }
        LJIIZILJ();
    }

    private void LIZ(int i, long j) {
        JSONObject jSONObject = new JSONObject();
        JSONObject jSONObject2 = new JSONObject();
        JSONObject jSONObject3 = new JSONObject();
        try {
            jSONObject.put("status_delay", i);
            jSONObject2.put("panel_cost", j);
            jSONObject3.put("status_delay", i);
            jSONObject3.put("panel_cost", j);
            jSONObject3.put("room_id", this.LJIILL);
            jSONObject3.put("anchor_id", this.LJIILIIL);
        } catch (JSONException e) {
            0HH.LIZ(e);
        }
        0c0.LIZ("ttlive_client_previewcard_linkmicstatus_delay", jSONObject, jSONObject2, jSONObject3);
    }

    private void LIZ(String str, PrivilegeLogExtra privilegeLogExtra) {
        String str2;
        String str3;
        HashMap hashMap = new HashMap();
        if (privilegeLogExtra != null) {
            hashMap.put("privilege_id", privilegeLogExtra.LIZIZ);
            hashMap.put("data_version_id", privilegeLogExtra.LIZ);
        }
        C3491GtA LIZ2 = C3491GtA.LJFF.LIZ(str);
        LIZ2.LIZ(this.LJFF);
        if (this.LJIIL) {
            str2 = "anchor";
        } else {
            str2 = "user";
        }
        LIZ2.LIZ("user_type", str2);
        UserProfileEvent userProfileEvent = this.LJJII;
        if (userProfileEvent != null) {
            str3 = userProfileEvent.mShowEntrance;
        } else {
            str3 = "";
        }
        LIZ2.LIZ("show_entrance", str3);
        LIZ2.LIZ("to_user_id", this.LJIILIIL);
        LIZ2.LIZ((Map<String, String>) hashMap);
        LIZ2.LIZLLL();
    }

    private void LIZ(User user, boolean z) {
        if (LJIIIZ()) {
            if (!LJJI()) {
                LIZIZ(user);
                return;
            }
            LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) this.LIZIZ.getLayoutParams();
            LinearLayout.LayoutParams layoutParams2 = (LinearLayout.LayoutParams) this.LIZJ.getLayoutParams();
            if (z) {
                ValueAnimator ofFloat = ValueAnimator.ofFloat(new float[]{1.0f, 3.1f});
                this.LJJL = ofFloat;
                ofFloat.setDuration(300);
                this.LJJL.setInterpolator(new 1Lt());
            }
            if (user.isFollowing()) {
                if (this.LJIJJLI) {
                    LJFF();
                } else {
                    this.LIZJ.setText(2131829132);
                    if (LJIL()) {
                        this.LIZJ.LIZ(2131886866);
                    } else {
                        this.LIZJ.LIZ(2131886867);
                    }
                    this.LIZJ.setIcon((Drawable) null);
                }
                this.LIZLLL.LIZ(2131886867);
                this.LIZLLL.setIcon((Drawable) null);
                this.LIZLLL.setText(2131830105);
                if (z) {
                    this.LJJL.addUpdateListener(new C2928Gk5(this, layoutParams2, layoutParams));
                    this.LJJL.start();
                    return;
                }
                if (LJJI()) {
                    layoutParams2.weight = 3.1f;
                } else {
                    layoutParams2.weight = 1.0f;
                }
                this.LIZJ.setLayoutParams(layoutParams2);
                this.LIZLLL.setLayoutParams(layoutParams2);
                LJI();
                layoutParams.weight = 1.0f;
                this.LIZIZ.setLayoutParams(layoutParams);
                return;
            }
            this.LIZIZ.LIZ(2131886860);
            this.LIZIZ.setIcon((Drawable) null);
            this.LIZIZ.setText(2131833997);
            this.LIZJ.LIZ(2131886867);
            if (this.LJIJJLI) {
                this.LIZJ.setIcon(2131235138);
            } else if (LJIL()) {
                this.LIZJ.setIcon(2131235144);
            } else {
                this.LIZJ.setIcon(2131235143);
            }
            this.LIZJ.setText("");
            this.LIZLLL.LIZ(2131886867);
            this.LIZLLL.setIcon(2131235142);
            this.LIZLLL.setText("");
            if (z) {
                this.LJJL.addUpdateListener(new C2929Gk6(this, layoutParams2, layoutParams));
                this.LJJL.start();
            } else {
                layoutParams2.weight = 1.0f;
                this.LIZJ.setLayoutParams(layoutParams2);
                this.LIZLLL.setLayoutParams(layoutParams2);
                if (LJJI()) {
                    layoutParams.weight = 3.1f;
                } else {
                    layoutParams.weight = 1.0f;
                }
                this.LIZIZ.setLayoutParams(layoutParams);
            }
            this.LJIIJ.getFollowInfo().setPushStatus(2);
        }
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        int i;
        View LIZ2;
        MethodCollector.i(6134);
        this.LJJJJZI = true;
        ((C4366HHj) C2675Gg0.LIZ().LIZ(C2956GkX.class).LIZ(Pm5.LIZ(this, SRf.DESTROY)).LIZ(DEF.LIZ(this))).LIZ(new C2949GkQ(this));
        if (this.LJIIZILJ) {
            i = 2131561762;
        } else {
            i = 2131561763;
        }
        View LIZ3 = 0HH.LIZ(layoutInflater, i, viewGroup, false);
        this.LJJJJIZL = LIZ3;
        this.LJJIIZ = (TextView) LIZ3.findViewById(2131367877);
        this.LJJJJJ = this.LJJJJIZL.findViewById(2131372634);
        this.LJJJJJL = this.LJJJJIZL.findViewById(2131362601);
        this.LJJIIZI = (TextView) this.LJJJJIZL.findViewById(2131368010);
        this.LIZ = (ImageView) this.LJJJJIZL.findViewById(2131362476);
        this.LJJIJ = (TextView) this.LJJJJIZL.findViewById(2131372718);
        this.LJJIJIIJI = (TextView) this.LJJJJIZL.findViewById(2131371806);
        this.LJJIJIIJIL = (TextView) this.LJJJJIZL.findViewById(2131365129);
        this.LJJIJIL = (TextView) this.LJJJJIZL.findViewById(2131365116);
        this.LJJIJL = (TextView) this.LJJJJIZL.findViewById(2131370819);
        this.LJJIJLIJ = this.LJJJJIZL.findViewById(2131370820);
        this.LJJIL = (FrameLayout) this.LJJJJIZL.findViewById(2131361911);
        if (this.LJIIZILJ) {
            if (LJIIIZ()) {
                LIZ2 = 0HH.LIZ(LayoutInflater.from(getContext()), 2131562106, viewGroup, false);
            } else {
                LIZ2 = 0HH.LIZ(LayoutInflater.from(getContext()), 2131562103, viewGroup, false);
            }
            this.LJJIL.addView(LIZ2);
        }
        this.LJJIZ = (LinearLayout) this.LJJJJIZL.findViewById(2131362596);
        this.LJJJ = (ViewGroup) this.LJJJJIZL.findViewById(2131361910);
        this.LIZJ = this.LJJJJIZL.findViewById(2131367122);
        this.LIZLLL = this.LJJJJIZL.findViewById(2131372562);
        this.LJJJI = this.LJJJJIZL.findViewById(2131362435);
        this.LIZIZ = this.LJJJJIZL.findViewById(2131365093);
        this.LJJJIL = this.LJJJJIZL.findViewById(2131370809);
        this.LJJJJ = this.LJJJJIZL.findViewById(2131373089);
        this.LJJJJI = this.LJJJJIZL.findViewById(2131363474);
        this.LJI = this.LJJJJIZL.findViewById(2131367310);
        this.LJII = this.LJJJJIZL.findViewById(2131367299);
        this.LJIIIIZZ = this.LJJJJIZL.findViewById(2131367001);
        this.LJIIIZ = this.LJJJJIZL.findViewById(2131368999);
        this.LJI.setVisibility(8);
        this.LJII.setVisibility(8);
        this.LJIIIZ.setVisibility(0);
        this.LJJJJL = (TextView) this.LJJJJIZL.findViewById(2131367072);
        LIZ(this.LJIIJ);
        DataChannel dataChannel = this.LJFF;
        if (dataChannel != null) {
            dataChannel.LIZJ(2DA.class, true);
            this.LJFF.LIZ((0CH) this, 2AY.class, new C2937GkE(this));
        }
        DataChannelGlobal.LIZLLL.LIZ(this, this, 2Cu.class, new C2936GkD(this));
        LJIIJ();
        View view = this.LJJJJIZL;
        MethodCollector.o(6134);
        return view;
    }
}
