TikTok.apk(点击下载) / C232959Dg.java


package X;

import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.oplus.ocs.base.common.constant.CommonStatusCodes;
import com.ss.android.ugc.aweme.IAccountUserService;
import com.ss.android.ugc.aweme.comment.CommentServiceImpl;
import com.ss.android.ugc.aweme.comment.barrage.cell.ReactionBubbleCommentCell;
import com.ss.android.ugc.aweme.comment.barrage.cell.ReactionBubbleCommonCell;
import com.ss.android.ugc.aweme.comment.barrage.cell.ReactionBubbleDescriptionCell;
import com.ss.android.ugc.aweme.comment.barrage.view.AwemeCommentBubbleList;
import com.ss.android.ugc.aweme.comment.model.Comment;
import com.ss.android.ugc.aweme.comment.model.CommentItemList;
import com.ss.android.ugc.aweme.comment.model.LikeListResponse;
import com.ss.android.ugc.aweme.comment.model.ViewerListResponse;
import com.ss.android.ugc.aweme.comment.viewmodel.CommentListViewModel;
import com.ss.android.ugc.aweme.comment.viewmodel.LikeListVM;
import com.ss.android.ugc.aweme.comment.viewmodel.VideoViewerListVM;
import com.ss.android.ugc.aweme.feed.model.Aweme;
import com.ss.android.ugc.aweme.profile.model.User;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import kotlin.g.b.m;
import org.greenrobot.eventbus.ThreadMode;

/* renamed from: X.9Dg  reason: invalid class name and case insensitive filesystem */
public final class C232959Dg extends AbstractC232969Dh implements AnonymousClass0CM<C26586AcR>, AbstractC24850yg, AbstractC24860yh {
    public static final C233149Dz LJFF = new C233149Dz((byte) 0);
    public final String LIZLLL;
    public final AnonymousClass9DY LJ;
    public boolean LJI = true;
    public int LJII;
    public int LJIIIIZZ;
    public int LJIIIZ;
    public final AbstractC23460wR LJIIJ = AnonymousClass1PN.LIZ((AnonymousClass1IL) new C232979Di(this));
    public final AbstractC23460wR LJIIJJI = AnonymousClass1PN.LIZ((AnonymousClass1IL) new C232999Dk(this));
    public final AbstractC23460wR LJIIL = AnonymousClass1PN.LIZ((AnonymousClass1IL) new C233009Dl(this));
    public List<? extends AbstractC29447BhU> LJIILIIL;
    public AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> LJIILJJIL;
    public AbstractC29447BhU LJIILL;

    static {
        Covode.recordClassIndex(49919);
    }

    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public C232959Dg(String str, AnonymousClass9DY r5, AwemeCommentBubbleList awemeCommentBubbleList) {
        super(awemeCommentBubbleList);
        C21090sc.LIZ(r5, awemeCommentBubbleList);
        this.LIZLLL = str;
        this.LJ = r5;
        CommentListViewModel LIZLLL2 = LIZLLL();
        LIZLLL2.LIZ("REFRESH_STORY_COMMENT_LIST_SUCCESS", (AnonymousClass0CM<C26586AcR>) this);
        LIZLLL2.LIZ("REFRESH_STORY_COMMENT_LIST_FAIL", (AnonymousClass0CM<C26586AcR>) this);
        LIZLLL2.LIZ("LOAD_MORE_STORY_COMMENT_LIST_SUCCESS", (AnonymousClass0CM<C26586AcR>) this);
        LIZLLL2.LIZ("LOAD_MORE_STORY_COMMENT_LIST_FAIL", (AnonymousClass0CM<C26586AcR>) this);
        LikeListVM.BubbleBridge LIZ = LJ().LIZ();
        LIZ.LIZ("REFRESH_LIKED_LIST_SUCCESS", (AnonymousClass0CM<C26586AcR>) this);
        LIZ.LIZ("REFRESH_LIKED_LIST_FAIL", (AnonymousClass0CM<C26586AcR>) this);
        LIZ.LIZ("LOAD_MORE_LIKED_LIST_SUCCESS", (AnonymousClass0CM<C26586AcR>) this);
        LIZ.LIZ("LOAD_MORE_LIKED_LIST_FAIL", (AnonymousClass0CM<C26586AcR>) this);
        VideoViewerListVM.BubbleVideoViewerViewModel LIZIZ = LJI().LIZIZ();
        LIZIZ.LIZ("REFRESH_VIDEO_VIEWER_HISTORY_SUCCESS", (AnonymousClass0CM<C26586AcR>) this);
        LIZIZ.LIZ("REFRESH_VIDEO_VIEWER_HISTORY_FAIL", (AnonymousClass0CM<C26586AcR>) this);
        LIZIZ.LIZ("LOAD_MORE_VIDEO_VIEWER_HISTORY_SUCCESS", (AnonymousClass0CM<C26586AcR>) this);
        LIZIZ.LIZ("LOAD_MORE_VIDEO_VIEWER_HISTORY_FAIL", (AnonymousClass0CM<C26586AcR>) this);
    }

    private final void LIZ(CommentItemList commentItemList, boolean z) {
        List<Comment> replyComments;
        List<Comment> list = commentItemList.items;
        if (list == null) {
            list = AnonymousClass1I6.INSTANCE;
        }
        AnonymousClass9NB.LIZIZ("CommentAndLikeListMgr", "handleCommentListData original comment size " + list.size());
        ArrayList<Comment> arrayList = new ArrayList();
        for (Comment comment : list) {
            m.LIZIZ(comment, "");
            arrayList.add(comment);
            if (list.size() < 20 && (replyComments = comment.getReplyComments()) != null) {
                arrayList.addAll(replyComments);
            }
        }
        ArrayList arrayList2 = new ArrayList(AnonymousClass1ZP.LIZ((Iterable) arrayList, 10));
        for (Comment comment2 : arrayList) {
            arrayList2.add(AnonymousClass9CR.LIZ(comment2, this.LIZJ.getMMobEventParam()));
        }
        List LJII2 = AnonymousClass1ZP.LJII((Collection) arrayList2);
        AbstractC29447BhU bhU = this.LJIILL;
        if (bhU != null && z) {
            LJII2.add(0, bhU);
        }
        this.LJIIIZ++;
        AnonymousClass9NB.LIZIZ("CommentAndLikeListMgr", "currentCommentLoadTimes:" + this.LJIIIZ + " commentItems: " + LJII2.size() + " handleCommentListData: " + z + " hasmore " + commentItemList.hasMore + ' ' + this.LJIILIIL);
        if (!commentItemList.hasMore || this.LJIIIZ >= 5) {
            AnonymousClass9NB.LIZIZ("TrackResume", "continua.resume 3");
            AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r5 = this.LJIILJJIL;
            if (r5 != null) {
                r5.resumeWith(C23790wy.m3constructorimpl(C184137Lm.LIZ(AbstractC184127Ll.LIZ, null, new C233109Dv(2, 0), LJII2, 1)));
            }
            this.LJIILJJIL = null;
        } else {
            AnonymousClass9NB.LIZIZ("TrackResume", "continua.resume 2");
            AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r4 = this.LJIILJJIL;
            if (r4 != null) {
                r4.resumeWith(C23790wy.m3constructorimpl(C184137Lm.LIZ(AbstractC184127Ll.LIZ, null, new C233109Dv(1, commentItemList.cursor), LJII2, 1)));
            }
            this.LJIILJJIL = null;
        }
        if (z && LJII2.size() > 1) {
            this.LIZJ.LJIIZILJ();
        }
    }

    private final void LIZ(LikeListResponse likeListResponse, boolean z) {
        ArrayList arrayList;
        if (likeListResponse.getLikeList() == null) {
            arrayList = AnonymousClass1I6.INSTANCE;
        } else {
            List<User> likeList = likeListResponse.getLikeList();
            ArrayList arrayList2 = new ArrayList(AnonymousClass1ZP.LIZ((Iterable) likeList, 10));
            Iterator<T> it = likeList.iterator();
            while (it.hasNext()) {
                arrayList2.add(AnonymousClass9CR.LIZ((User) it.next(), this.LIZJ.getMMobEventParam()));
            }
            arrayList = arrayList2;
        }
        AnonymousClass9NB.LIZIZ("CommentAndLikeListMgr", "handleLikedListData data:hasmore:" + likeListResponse.getHasMore() + " likedListItems:" + arrayList.size() + " currentLikeLoadTimes:" + this.LJII + ' ');
        Collection collection = this.LJIILIIL;
        if (collection == null) {
            collection = AnonymousClass1I6.INSTANCE;
        }
        List<? extends AbstractC29447BhU> LIZLLL2 = AnonymousClass1ZP.LIZLLL(collection, (Iterable) arrayList);
        this.LJII++;
        this.LJIILIIL = null;
        if (!likeListResponse.getHasMore() || this.LJII >= 5) {
            AnonymousClass9NB.LIZIZ("CommentAndLikeListMgr", "check enableVideoViewer " + LJFF());
            if (LJFF()) {
                AnonymousClass9NB.LIZIZ("TrackResume", "continua.resume 5");
                AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r9 = this.LJIILJJIL;
                if (r9 != null) {
                    r9.resumeWith(C23790wy.m3constructorimpl(C184137Lm.LIZ(AbstractC184127Ll.LIZ, null, new C233109Dv(4, 0), LIZLLL2, 1)));
                }
                this.LJIILJJIL = null;
            } else {
                AnonymousClass9NB.LIZIZ("TrackResume", "continua.resume 6");
                AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r1 = this.LJIILJJIL;
                if (r1 != null) {
                    r1.resumeWith(C23790wy.m3constructorimpl(AbstractC184127Ll.LIZ.LIZ(LIZLLL2)));
                }
                this.LJIILJJIL = null;
            }
        } else {
            AnonymousClass9NB.LIZIZ("TrackResume", "continua.resume 4");
            AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r92 = this.LJIILJJIL;
            if (r92 != null) {
                r92.resumeWith(C23790wy.m3constructorimpl(C184137Lm.LIZ(AbstractC184127Ll.LIZ, null, new C233109Dv(2, likeListResponse.getCursor()), LIZLLL2, 1)));
            }
            this.LJIILJJIL = null;
        }
        AnonymousClass9NB.LIZIZ("CommentAndLikeListMgr", "handleLikedListData:powerItemssize:" + LIZLLL2.size());
        if (z && (!LIZLLL2.isEmpty())) {
            this.LIZJ.LJIIZILJ();
        } else if (LIZLLL2.size() == 1 && !LJFF()) {
            AwemeCommentBubbleList awemeCommentBubbleList = this.LIZJ;
            awemeCommentBubbleList.LJJJJJL = awemeCommentBubbleList.getFirstDataPositionInState();
            awemeCommentBubbleList.LJIJ();
            awemeCommentBubbleList.LIZIZ(0);
            awemeCommentBubbleList.setVisibility(0);
        }
    }

    private final void LIZ(ViewerListResponse viewerListResponse, boolean z) {
        ArrayList arrayList;
        if (viewerListResponse.getViewerList() == null) {
            arrayList = AnonymousClass1I6.INSTANCE;
        } else {
            List<User> viewerList = viewerListResponse.getViewerList();
            ArrayList arrayList2 = new ArrayList(AnonymousClass1ZP.LIZ((Iterable) viewerList, 10));
            for (T t : viewerList) {
                AnonymousClass9CL mMobEventParam = this.LIZJ.getMMobEventParam();
                C21090sc.LIZ(t);
                arrayList2.add(new AnonymousClass9CP(t, AnonymousClass1ZP.LIZ(Integer.valueOf((int) CommonStatusCodes.AUTHENTICATE_FAIL)), "views", mMobEventParam));
            }
            arrayList = arrayList2;
        }
        AnonymousClass9NB.LIZIZ("CommentAndLikeListMgr", "handleVideoViewerListData data:hasmore:" + viewerListResponse.getHasMore() + ' ' + arrayList.size() + " currentLikeLoadTimes:" + this.LJII);
        Collection collection = this.LJIILIIL;
        if (collection == null) {
            collection = AnonymousClass1I6.INSTANCE;
        }
        List<? extends AbstractC29447BhU> LIZLLL2 = AnonymousClass1ZP.LIZLLL(collection, (Iterable) arrayList);
        this.LJIIIIZZ++;
        this.LJIILIIL = null;
        if (!viewerListResponse.getHasMore() || this.LJIIIIZZ >= 5) {
            AnonymousClass9NB.LIZIZ("TrackResume", "continua.resume 8");
            AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r1 = this.LJIILJJIL;
            if (r1 != null) {
                r1.resumeWith(C23790wy.m3constructorimpl(AbstractC184127Ll.LIZ.LIZ(LIZLLL2)));
            }
            this.LJIILJJIL = null;
        } else {
            AnonymousClass9NB.LIZIZ("TrackResume", "continua.resume 7");
            AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r10 = this.LJIILJJIL;
            if (r10 != null) {
                r10.resumeWith(C23790wy.m3constructorimpl(C184137Lm.LIZ(AbstractC184127Ll.LIZ, null, new C233109Dv(4, viewerListResponse.getCursor()), LIZLLL2, 1)));
            }
            this.LJIILJJIL = null;
        }
        AnonymousClass9NB.LIZIZ("CommentAndLikeListMgr", "handleVideoViewerListData:powerItemssize:" + LIZLLL2.size() + ' ' + LIZLLL2);
        if (z && (!LIZLLL2.isEmpty())) {
            this.LIZJ.LJIIZILJ();
        }
    }

    private final CommentListViewModel LIZLLL() {
        return (CommentListViewModel) this.LJIIJ.getValue();
    }

    private final LikeListVM LJ() {
        return (LikeListVM) this.LJIIJJI.getValue();
    }

    private final boolean LJFF() {
        Aweme aweme = this.LIZIZ;
        String str = this.LJ.LIZJ;
        if (str == null) {
            str = "";
        }
        C21090sc.LIZ(str);
        return C233239Ei.LIZIZ(aweme, str) && !C27122Al5.LJ(aweme) && C233239Ei.LIZ(aweme) && C233239Ei.LIZJ() && C233239Ei.LIZIZ(aweme) > 0 && (AnonymousClass967.LIZ.LIZ() & 2) == 2;
    }

    private final VideoViewerListVM LJI() {
        return (VideoViewerListVM) this.LJIIL.getValue();
    }

    @Override // X.AbstractC232969Dh
    public final void LIZ() {
        this.LIZJ.LIZ(ReactionBubbleDescriptionCell.class, ReactionBubbleCommentCell.class, ReactionBubbleCommonCell.class);
    }

    @Override // X.AbstractC232969Dh
    public final void LIZ(AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r6) {
        C21090sc.LIZ(r6);
        this.LJIILJJIL = r6;
        if (this.LJI) {
            LIZLLL().LIZ(this.LIZ, 0);
            return;
        }
        ArrayList arrayList = new ArrayList();
        AbstractC29447BhU bhU = this.LJIILL;
        if (bhU != null) {
            arrayList.add(0, bhU);
        }
        this.LJIILIIL = arrayList;
        LJ().LIZ().LIZ(this.LIZ, 0);
    }

    @Override // X.AbstractC232969Dh
    public final void LIZ(AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r6, C233109Dv r7) {
        C21090sc.LIZ(r6, r7);
        this.LJIILJJIL = r6;
        AnonymousClass9NB.LIZIZ("CommentAndLikeListMgr", "list load more cursor:" + r7.LIZIZ + "  type:" + r7.LIZ);
        if (r7.LIZ == 1) {
            LIZLLL().LIZ(this.LIZ, r7.LIZIZ);
        } else if (r7.LIZ == 2) {
            LJ().LIZ().LIZ(this.LIZ, r7.LIZIZ);
        } else {
            LJI().LIZIZ().LIZ(this.LIZ, r7.LIZIZ, EnumC233189Ed.BULLET.getValue());
        }
    }

    @Override // X.AbstractC232969Dh
    public final void LIZ(Aweme aweme) {
        C21090sc.LIZ(aweme);
        this.LJII = 0;
        this.LJIIIZ = 0;
        User author = aweme.getAuthor();
        m.LIZIZ(author, "");
        this.LJIILL = new AnonymousClass9CX(author, aweme, aweme.getCreateTime() * 1000, this.LIZJ.getMMobEventParam());
        this.LIZJ.getState().LIZ(this.LJIILL);
        this.LJI = CommentServiceImpl.LJI().LIZIZ(aweme);
        super.LIZ(aweme);
        C63828P4f.LIZ(this);
    }

    @Override // X.AbstractC232969Dh
    public final void LIZIZ() {
        super.LIZIZ();
        C63828P4f.LIZIZ(this);
    }

    @Override // X.AbstractC24850yg
    public final Map<Integer, Object> getSubscriberEventTypes() {
        HashMap hashMap = new HashMap();
        hashMap.put(159, new RunnableC30721Jl(C232959Dg.class, "onCommentDeleteEvent", AnonymousClass90P.class, ThreadMode.MAIN, 0, false));
        hashMap.put(224, new RunnableC30721Jl(C232959Dg.class, "onDiggEvent", AnonymousClass9EX.class, ThreadMode.MAIN, 0, false));
        hashMap.put(225, new RunnableC30721Jl(C232959Dg.class, "onBlockUser", C227138wA.class, ThreadMode.MAIN, 0, false));
        hashMap.put(226, new RunnableC30721Jl(C232959Dg.class, "onCommentEvent", AnonymousClass911.class, ThreadMode.MAIN, 0, false));
        hashMap.put(174, new RunnableC30721Jl(C232959Dg.class, "onAuthChangeEvent", C162516a8.class, ThreadMode.POSTING, 0, false));
        return hashMap;
    }

    @AbstractC24870yi
    public final void onAuthChangeEvent(C162516a8 r2) {
        if (r2 != null && r2.LIZIZ) {
            LIZJ();
        }
    }

    @AbstractC24870yi(LIZ = ThreadMode.MAIN)
    public final void onBlockUser(C227138wA r1) {
        LIZJ();
    }

    /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
    @Override // X.AnonymousClass0CM
    public final /* synthetic */ void onChanged(C26586AcR acR) {
        String str;
        C26586AcR acR2 = acR;
        AnonymousClass9NB.LIZIZ("CommentAndLikeListMgr", "onChanged  " + (acR2 != null ? acR2.LIZ : null) + " this is " + this);
        if (acR2 != null && (str = acR2.LIZ) != null) {
            switch (str.hashCode()) {
                case -1108427715:
                    if (str.equals("LOAD_MORE_STORY_COMMENT_LIST_SUCCESS")) {
                        C23760wv r2 = (C23760wv) acR2.LIZ();
                        if (m.LIZ(r2.getFirst(), (Object) this.LIZ)) {
                            LIZ((CommentItemList) r2.getSecond(), false);
                            return;
                        }
                        return;
                    }
                    return;
                case -1077696328:
                    if (str.equals("REFRESH_LIKED_LIST_SUCCESS")) {
                        C23760wv r22 = (C23760wv) acR2.LIZ();
                        if (m.LIZ(r22.getFirst(), (Object) this.LIZ)) {
                            LIZ((LikeListResponse) r22.getSecond(), true);
                            return;
                        }
                        return;
                    }
                    return;
                case -1042345298:
                    if (!str.equals("REFRESH_VIDEO_VIEWER_HISTORY_FAIL")) {
                        return;
                    }
                    break;
                case -734123415:
                    if (!str.equals("REFRESH_LIKED_LIST_FAIL")) {
                        return;
                    }
                    break;
                case -675733933:
                    if (str.equals("REFRESH_VIDEO_VIEWER_HISTORY_SUCCESS")) {
                        C23760wv r23 = (C23760wv) acR2.LIZ();
                        if (m.LIZ(r23.getFirst(), (Object) this.LIZ)) {
                            LIZ((ViewerListResponse) r23.getSecond(), true);
                            return;
                        }
                        return;
                    }
                    return;
                case -249497211:
                    if (str.equals("LOAD_MORE_LIKED_LIST_SUCCESS")) {
                        C23760wv r24 = (C23760wv) acR2.LIZ();
                        if (m.LIZ(r24.getFirst(), (Object) this.LIZ)) {
                            LIZ((LikeListResponse) r24.getSecond(), false);
                            return;
                        }
                        return;
                    }
                    return;
                case -108517967:
                    if (!str.equals("REFRESH_STORY_COMMENT_LIST_FAIL")) {
                        return;
                    }
                    break;
                case -70365948:
                    if (!str.equals("LOAD_MORE_STORY_COMMENT_LIST_FAIL")) {
                        return;
                    }
                    break;
                case 471107696:
                    if (str.equals("REFRESH_STORY_COMMENT_LIST_SUCCESS")) {
                        C23760wv r25 = (C23760wv) acR2.LIZ();
                        if (m.LIZ(r25.getFirst(), (Object) this.LIZ)) {
                            LIZ((CommentItemList) r25.getSecond(), true);
                            return;
                        }
                        return;
                    }
                    return;
                case 1262006593:
                    if (!str.equals("LOAD_MORE_VIDEO_VIEWER_HISTORY_FAIL")) {
                        return;
                    }
                    break;
                case 1780372668:
                    if (!str.equals("LOAD_MORE_LIKED_LIST_FAIL")) {
                        return;
                    }
                    break;
                case 1809158880:
                    if (str.equals("LOAD_MORE_VIDEO_VIEWER_HISTORY_SUCCESS")) {
                        C23760wv r26 = (C23760wv) acR2.LIZ();
                        if (m.LIZ(r26.getFirst(), (Object) this.LIZ)) {
                            LIZ((ViewerListResponse) r26.getSecond(), false);
                            return;
                        }
                        return;
                    }
                    return;
                default:
                    return;
            }
            if (m.LIZ(acR2.LIZ(), (Object) this.LIZ)) {
                AnonymousClass9NB.LIZIZ("TrackResume", "continua.resume 1");
                AbstractC23200w1<? super AbstractC184127Ll<C233109Dv>> r27 = this.LJIILJJIL;
                if (r27 != null) {
                    r27.resumeWith(C23790wy.m3constructorimpl(AbstractC184127Ll.LIZ.LIZ(new Exception())));
                }
                this.LJIILJJIL = null;
            }
        }
    }

    @AbstractC24870yi(LIZ = ThreadMode.MAIN)
    public final void onCommentDeleteEvent(AnonymousClass90P r1) {
        C21090sc.LIZ(r1);
    }

    @AbstractC24870yi(LIZ = ThreadMode.MAIN)
    public final void onCommentEvent(AnonymousClass911 r8) {
        C21090sc.LIZ(r8);
        Comment comment = r8.LIZIZ;
        int i2 = r8.LIZ;
        if (i2 == 1) {
            AwemeCommentBubbleList awemeCommentBubbleList = this.LIZJ;
            C21090sc.LIZ(comment);
            AnonymousClass9NB.LIZIZ("ReactionBubbleList", "from outside comment");
            if (awemeCommentBubbleList.LJJJI != null) {
                awemeCommentBubbleList.setVisibility(0);
                awemeCommentBubbleList.LJIJ();
                if (awemeCommentBubbleList.LJJJJJL == 0 || (awemeCommentBubbleList.getState().LIZIZ(awemeCommentBubbleList.LJJJJJL - 1) instanceof AnonymousClass9CQ) || (awemeCommentBubbleList.getState().LIZIZ(awemeCommentBubbleList.LJJJJJL - 1) instanceof AnonymousClass9CX)) {
                    awemeCommentBubbleList.getState().LIZ(awemeCommentBubbleList.LJJJJJL, AnonymousClass9CR.LIZ(comment, awemeCommentBubbleList.LJJJJI));
                } else {
                    awemeCommentBubbleList.getState().LIZ(awemeCommentBubbleList.getFirstDataPositionInState(), AnonymousClass9CR.LIZ(comment, awemeCommentBubbleList.LJJJJI));
                }
                awemeCommentBubbleList.postDelayed(new RunnableC233119Dw(awemeCommentBubbleList), 80);
            }
        } else if (i2 == 2) {
            AwemeCommentBubbleList awemeCommentBubbleList2 = this.LIZJ;
            C21090sc.LIZ(comment);
            String fakeId = comment.getFakeId();
            m.LIZIZ(fakeId, "");
            if (!TextUtils.isEmpty(fakeId)) {
                Iterator<AbstractC29447BhU> it = awemeCommentBubbleList2.getState().LIZJ().iterator();
                int i3 = 0;
                while (true) {
                    if (!it.hasNext()) {
                        i3 = -1;
                        break;
                    }
                    AbstractC29447BhU next = it.next();
                    if ((next instanceof AnonymousClass9CQ) && m.LIZ((Object) ((AnonymousClass9CQ) next).LIZ.getFakeId(), (Object) fakeId)) {
                        break;
                    }
                    i3++;
                }
                if (i3 >= 0) {
                    AbstractC29447BhU LIZIZ = awemeCommentBubbleList2.getState().LIZIZ(i3);
                    if (LIZIZ instanceof AnonymousClass9CQ) {
                        awemeCommentBubbleList2.getState().LIZIZ(i3, new AnonymousClass9CQ(comment, ((AnonymousClass9CQ) LIZIZ).LIZIZ, awemeCommentBubbleList2.LJJJJI));
                    }
                }
            }
        } else if (i2 == 3) {
            AwemeCommentBubbleList awemeCommentBubbleList3 = this.LIZJ;
            C21090sc.LIZ(comment);
            AnonymousClass9NB.LIZIZ("ReactionBubbleList", "onCommentDeleted");
            AbstractC232969Dh r0 = awemeCommentBubbleList3.LJJJI;
            if (r0 != null) {
                r0.LIZJ();
            }
        }
    }

    @AbstractC24870yi(LIZ = ThreadMode.MAIN)
    public final void onDiggEvent(AnonymousClass9EX r7) {
        C21090sc.LIZ(r7);
        if (r7.LIZ == 1) {
            AwemeCommentBubbleList awemeCommentBubbleList = this.LIZJ;
            AnonymousClass9NB.LIZIZ("ReactionBubbleList", "diggSuccess");
            if (!awemeCommentBubbleList.LJJJJIZL && !awemeCommentBubbleList.LJJJJLI && awemeCommentBubbleList.getState() != null && awemeCommentBubbleList.getState().LIZIZ() != 0) {
                AnonymousClass9NB.LIZIZ("ReactionBubbleList", "[diggSuccess size is: " + awemeCommentBubbleList.getState().LIZIZ() + ", insert position: " + awemeCommentBubbleList.LJJJJJL + ']');
                awemeCommentBubbleList.setVisibility(0);
                awemeCommentBubbleList.LJJJJLI = true;
                awemeCommentBubbleList.LJIJ();
                awemeCommentBubbleList.LJJJJL = awemeCommentBubbleList.LJJJJJL;
                IAccountUserService LJFF2 = C12290eQ.LJFF();
                m.LIZIZ(LJFF2, "");
                User curUser = LJFF2.getCurUser();
                m.LIZIZ(curUser, "");
                awemeCommentBubbleList.getState().LIZ(awemeCommentBubbleList.LJJJJL, AnonymousClass9CR.LIZ(curUser, awemeCommentBubbleList.LJJJJI));
                AnonymousClass9NB.LIZIZ("ReactionBubbleList", "[diggSuccess finish insert and state size is: " + awemeCommentBubbleList.getState().LIZIZ() + ']');
                awemeCommentBubbleList.postDelayed(new AnonymousClass9DU(awemeCommentBubbleList), 40);
            }
        }
    }
}