正在查看: MX Player v1.97.8 应用的 CommentDetailViewModel.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MX Player v1.97.8 应用的 CommentDetailViewModel.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mxtech.videoplayer.ad.online.playback.detail.comment.viewmodel;
import com.mxplay.login.model.UserInfo;
import com.mxtech.edit.VideoClipActivity;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.CommentItem;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.CommentModel;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.DeleteItem;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.LikeItem;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.ReplyCommentItem;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.ReplyCommentModel;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.RequestStatus;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.fragment.CommentDetailFragment;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.livedata.CommentLoadingLiveData;
import com.mxtech.videoplayer.ad.online.playback.detail.comment.viewmodel.CommentDetailViewModel;
import com.vungle.ads.internal.protos.Sdk$SDKMetric;
import defpackage.bn3;
import defpackage.d83;
import defpackage.dc1;
import defpackage.e83;
import defpackage.ec1;
import defpackage.o6b;
import defpackage.y73;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.jvm.JvmClassMappingKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
@Metadata(d1 = {"\u0000l\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u000e\n\u0002\u0010\b\n\u0002\b\u0010\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0010!\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u001e\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u000f\u0010\u0005\u001a\u00020\u0004H\u0014¢\u0006\u0004\b\u0005\u0010\u0003J\u0015\u0010\b\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006¢\u0006\u0004\b\b\u0010\tJ+\u0010\f\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\b\u0010\n\u001a\u0004\u0018\u00010\u00062\b\u0010\u000b\u001a\u0004\u0018\u00010\u0006¢\u0006\u0004\b\f\u0010\rJ\u0015\u0010\u000f\u001a\u00020\u00042\u0006\u0010\u000e\u001a\u00020\u0006¢\u0006\u0004\b\u000f\u0010\tJ%\u0010\u0013\u001a\u00020\u00042\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u0006¢\u0006\u0004\b\u0013\u0010\rJA\u0010\u0019\u001a\u00020\u00042\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\u00062\u0006\u0010\u0016\u001a\u00020\u00152\b\b\u0002\u0010\u0017\u001a\u00020\u00062\b\b\u0002\u0010\u0018\u001a\u00020\u0006¢\u0006\u0004\b\u0019\u0010\u001aJ?\u0010\u001c\u001a\u00020\u00042\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\u00062\u0006\u0010\u001b\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u00152\b\b\u0002\u0010\u0017\u001a\u00020\u0006¢\u0006\u0004\b\u001c\u0010\u001dJ-\u0010\u001e\u001a\u00020\u00042\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u0006¢\u0006\u0004\b\u001e\u0010\u001fJ=\u0010!\u001a\u00020\u00042\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010 \u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u00062\u0006\u0010\u0017\u001a\u00020\u0006¢\u0006\u0004\b!\u0010\"J\u001d\u0010$\u001a\u00020\u00042\u0006\u0010#\u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\u0006¢\u0006\u0004\b$\u0010%J\u001c\u0010'\u001a\u0004\u0018\u00010&2\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006H\u0082@¢\u0006\u0004\b'\u0010(J\u001c\u0010)\u001a\u0004\u0018\u00010&2\b\u0010\n\u001a\u0004\u0018\u00010\u0006H\u0082@¢\u0006\u0004\b)\u0010(J/\u0010,\u001a\u0004\u0018\u00010&2\b\u0010*\u001a\u0004\u0018\u00010&2\b\u0010+\u001a\u0004\u0018\u00010&2\b\u0010\u000b\u001a\u0004\u0018\u00010\u0006H\u0002¢\u0006\u0004\b,\u0010-J!\u00102\u001a\u000201*\u00020.2\f\u00100\u001a\b\u0012\u0004\u0012\u00020.0/H\u0002¢\u0006\u0004\b2\u00103J\u001d\u00104\u001a\u00020\u0004*\u00020.2\b\u0010\u000b\u001a\u0004\u0018\u00010\u0006H\u0002¢\u0006\u0004\b4\u00105J\u001c\u00106\u001a\u0004\u0018\u00010&2\b\u0010\u000e\u001a\u0004\u0018\u00010\u0006H\u0082@¢\u0006\u0004\b6\u0010(J*\u00107\u001a\u0004\u0018\u00010.2\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u0006H\u0082@¢\u0006\u0004\b7\u00108JD\u0010:\u001a\u0002092\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\u00062\u0006\u0010\u0016\u001a\u00020\u00152\b\b\u0002\u0010\u0017\u001a\u00020\u00062\b\b\u0002\u0010\u0018\u001a\u00020\u0006H\u0082@¢\u0006\u0004\b:\u0010;JB\u0010=\u001a\u00020<2\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\u00062\u0006\u0010\u001b\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u00152\b\b\u0002\u0010\u0017\u001a\u00020\u0006H\u0082@¢\u0006\u0004\b=\u0010>J2\u0010@\u001a\u0004\u0018\u00010?2\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u0006H\u0082@¢\u0006\u0004\b@\u0010AJB\u0010B\u001a\u0004\u0018\u00010?2\u0006\u0010\u0010\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00062\u0006\u0010 \u001a\u00020\u00062\u0006\u0010\u0014\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u00062\u0006\u0010\u0017\u001a\u00020\u0006H\u0082@¢\u0006\u0004\bB\u0010CJ$\u0010E\u001a\u0004\u0018\u00010D2\b\u0010#\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0014\u001a\u00020\u0006H\u0082@¢\u0006\u0004\bE\u0010FR(\u0010H\u001a\b\u0012\u0004\u0012\u00020&0G8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bH\u0010I\u001a\u0004\bJ\u0010K\"\u0004\bL\u0010MR(\u0010N\u001a\b\u0012\u0004\u0012\u00020&0G8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bN\u0010I\u001a\u0004\bO\u0010K\"\u0004\bP\u0010MR(\u0010Q\u001a\b\u0012\u0004\u0012\u00020&0G8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bQ\u0010I\u001a\u0004\bR\u0010K\"\u0004\bS\u0010MR(\u0010T\u001a\b\u0012\u0004\u0012\u00020.0G8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bT\u0010I\u001a\u0004\bU\u0010K\"\u0004\bV\u0010MR(\u0010W\u001a\b\u0012\u0004\u0012\u0002090G8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bW\u0010I\u001a\u0004\bX\u0010K\"\u0004\bY\u0010MR(\u0010Z\u001a\b\u0012\u0004\u0012\u00020<0G8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bZ\u0010I\u001a\u0004\b[\u0010K\"\u0004\b\\\u0010MR(\u0010]\u001a\b\u0012\u0004\u0012\u00020?0G8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b]\u0010I\u001a\u0004\b^\u0010K\"\u0004\b_\u0010MR(\u0010`\u001a\b\u0012\u0004\u0012\u00020?0G8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b`\u0010I\u001a\u0004\ba\u0010K\"\u0004\bb\u0010MR(\u0010c\u001a\b\u0012\u0004\u0012\u00020D0G8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bc\u0010I\u001a\u0004\bd\u0010K\"\u0004\be\u0010MR\u001a\u0010g\u001a\b\u0012\u0004\u0012\u00020\u00060f8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bg\u0010h¨\u0006i"}, d2 = {"Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/viewmodel/CommentDetailViewModel;", "Laii;", "<init>", "()V", "", "onCleared", "", CommentDetailFragment.COMMENT_URL, "launchRequest", "(Ljava/lang/String;)V", CommentDetailFragment.PIN_TOP_URL, CommentDetailFragment.C_ID, "launchPinTopRequest", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "moreUrl", "launchMoreRequest", CommentDetailFragment.V_ID, CommentDetailFragment.V_TYPE, "content", "launchAdd", "comment", "", "type", "parentId", "rcid", "launchDelete", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V", "change", "launchLike", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;)V", "launchReplyFirst", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "replyTo", "launchReplySecond", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "repliesUrl", "launchMoreReplies", "(Ljava/lang/String;Ljava/lang/String;)V", "Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/CommentModel;", "requestCommentDetail", "(Ljava/lang/String;Lbn3;)Ljava/lang/Object;", "requestPinTopCommentDetail", "commentModel", "pinTopCommentModel", "mergeResponses", "(Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/CommentModel;Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/CommentModel;Ljava/lang/String;)Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/CommentModel;", "Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/CommentItem;", "", "pinTopCommentItems", "", "isReplier", "(Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/CommentItem;Ljava/util/List;)Z", "isTarget", "(Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/CommentItem;Ljava/lang/String;)V", "requestCommentMoreDetail", "requestCommentAdd", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lbn3;)Ljava/lang/Object;", "Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/DeleteItem;", "requestCommentDelete", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Lbn3;)Ljava/lang/Object;", "Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/LikeItem;", "requestCommentLike", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IILjava/lang/String;Lbn3;)Ljava/lang/Object;", "Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/ReplyCommentItem;", "requestCommentReplyFirst", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lbn3;)Ljava/lang/Object;", "requestCommentReplySecond", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lbn3;)Ljava/lang/Object;", "Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/bean/ReplyCommentModel;", "requestCommentMoreReplies", "(Ljava/lang/String;Ljava/lang/String;Lbn3;)Ljava/lang/Object;", "Lc3c;", "commentDetailLiveData", "Lc3c;", "getCommentDetailLiveData", "()Lc3c;", "setCommentDetailLiveData", "(Lc3c;)V", "commentPinTopLiveData", "getCommentPinTopLiveData", "setCommentPinTopLiveData", "commentMoreDetailLiveData", "getCommentMoreDetailLiveData", "setCommentMoreDetailLiveData", "commentAddLiveData", "getCommentAddLiveData", "setCommentAddLiveData", "commentDeleteLiveData", "getCommentDeleteLiveData", "setCommentDeleteLiveData", "commentLikeLiveData", "getCommentLikeLiveData", "setCommentLikeLiveData", "commentReplyFirstLiveData", "getCommentReplyFirstLiveData", "setCommentReplyFirstLiveData", "commentReplySecondLiveData", "getCommentReplySecondLiveData", "setCommentReplySecondLiveData", "commentMoreReplyLiveData", "getCommentMoreReplyLiveData", "setCommentMoreReplyLiveData", "Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/livedata/CommentLoadingLiveData;", "loadingLiveData", "Lcom/mxtech/videoplayer/ad/online/playback/detail/comment/livedata/CommentLoadingLiveData;", "PlayerAd-vc2001002668-vn1.97.8.1.0-0_google_bundleRelease"}, k = 1, mv = {2, 0, 0}, xi = Sdk$SDKMetric.b.AD_SHOW_TO_VALIDATION_DURATION_MS_VALUE)
public final class CommentDetailViewModel extends aii {
@NotNull
private c3c<CommentModel> commentDetailLiveData = new c3c<>();
@NotNull
private c3c<CommentModel> commentPinTopLiveData = new c3c<>();
@NotNull
private c3c<CommentModel> commentMoreDetailLiveData = new c3c<>();
@NotNull
private c3c<CommentItem> commentAddLiveData = new c3c<>();
@NotNull
private c3c<DeleteItem> commentDeleteLiveData = new c3c<>();
@NotNull
private c3c<LikeItem> commentLikeLiveData = new c3c<>();
@NotNull
private c3c<ReplyCommentItem> commentReplyFirstLiveData = new c3c<>();
@NotNull
private c3c<ReplyCommentItem> commentReplySecondLiveData = new c3c<>();
@NotNull
private c3c<ReplyCommentModel> commentMoreReplyLiveData = new c3c<>();
@NotNull
private final CommentLoadingLiveData<String> loadingLiveData = new CommentLoadingLiveData<>();
private final boolean isReplier(CommentItem commentItem, List<CommentItem> list) {
Iterator<CommentItem> it = list.iterator();
while (it.hasNext()) {
if (Intrinsics.b(commentItem.getId(), it.next().getId())) {
return true;
}
}
return false;
}
private final void isTarget(CommentItem commentItem, String str) {
List<ReplyCommentItem> subCommentItemList = commentItem.getSubCommentItemList();
ArrayList arrayList = new ArrayList();
for (Object obj : subCommentItemList) {
if (Intrinsics.b(((ReplyCommentItem) obj).getId(), str)) {
arrayList.add(obj);
}
}
Iterator it = arrayList.iterator();
while (it.hasNext()) {
((ReplyCommentItem) it.next()).setShouldHighLight(true);
}
}
public static void launchLike$default(CommentDetailViewModel commentDetailViewModel, String str, String str2, String str3, int i, int i2, String str4, int i3, Object obj) {
if ((i3 & 32) != 0) {
str4 = "";
}
commentDetailViewModel.launchLike(str, str2, str3, i, i2, str4);
}
public final com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.CommentModel mergeResponses(com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.CommentModel r8, com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.CommentModel r9, java.lang.String r10) {
throw new UnsupportedOperationException("Method not decompiled: com.mxtech.videoplayer.ad.online.playback.detail.comment.viewmodel.CommentDetailViewModel.mergeResponses(com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.CommentModel, com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.CommentModel, java.lang.String):com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.CommentModel");
}
public final Object requestCommentAdd(String str, String str2, String str3, bn3<? super CommentItem> bn3Var) {
return ViewModelRequestKt.requestPostWithResponse$default("https://androidapi.mxplay.com/v1/comment/add", o6b.d(new Pair(CommentDetailFragment.V_ID, str), new Pair(CommentDetailFragment.V_TYPE, str2), new Pair("content", str3)), null, null, new ec1(str3, 1), bn3Var, 12, null);
}
public static final CommentItem requestCommentAdd$lambda$12(String str, JSONObject jSONObject) {
CommentItem initFromJson = CommentItem.INSTANCE.initFromJson(jSONObject);
initFromJson.setContent(str);
initFromJson.setSelf(true);
l3i l3iVar = a.a;
UserInfo b = l3iVar.b();
initFromJson.setWriterName(String.valueOf(b != null ? b.getName() : null));
UserInfo b2 = l3iVar.b();
initFromJson.setWriterImg(String.valueOf(b2 != null ? b2.getAvatar() : null));
initFromJson.setWriteTime(System.currentTimeMillis());
return initFromJson;
}
public final java.lang.Object requestCommentDelete(java.lang.String r16, java.lang.String r17, final java.lang.String r18, final int r19, final java.lang.String r20, final java.lang.String r21, defpackage.bn3<? super com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.DeleteItem> r22) {
throw new UnsupportedOperationException("Method not decompiled: com.mxtech.videoplayer.ad.online.playback.detail.comment.viewmodel.CommentDetailViewModel.requestCommentDelete(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, bn3):java.lang.Object");
}
public static final DeleteItem requestCommentDelete$lambda$15(String str, int i, String str2, String str3) {
DeleteItem deleteItem = new DeleteItem();
deleteItem.setComment(str);
deleteItem.setType(i);
deleteItem.setParentId(str2);
deleteItem.setRcid(str3);
deleteItem.setRequestStatus(RequestStatus.Success);
return deleteItem;
}
public final Object requestCommentDetail(String str, bn3<? super CommentModel> bn3Var) {
return ViewModelRequestKt.requestGetWithResponse$default(str, new d83(str, 0), null, new e83(0), bn3Var, 4, null);
}
public static final boolean requestCommentDetail$lambda$0(String str) {
return str == null || str.length() == 0;
}
public static final CommentModel requestCommentDetail$lambda$1(JSONObject jSONObject) {
return CommentModel.INSTANCE.initFromJson(jSONObject);
}
public final java.lang.Object requestCommentLike(java.lang.String r15, java.lang.String r16, final java.lang.String r17, int r18, final int r19, final java.lang.String r20, defpackage.bn3<? super com.mxtech.videoplayer.ad.online.playback.detail.comment.bean.LikeItem> r21) {
throw new UnsupportedOperationException("Method not decompiled: com.mxtech.videoplayer.ad.online.playback.detail.comment.viewmodel.CommentDetailViewModel.requestCommentLike(java.lang.String, java.lang.String, java.lang.String, int, int, java.lang.String, bn3):java.lang.Object");
}
public static final LikeItem requestCommentLike$lambda$18(String str, String str2, int i, JSONObject jSONObject) {
LikeItem initFromJson = LikeItem.INSTANCE.initFromJson(jSONObject);
initFromJson.setTargetId(str);
initFromJson.setTargetParentId(str2);
initFromJson.setType(i);
initFromJson.setRequestStatus(RequestStatus.Success);
return initFromJson;
}
public final Object requestCommentMoreDetail(String str, bn3<? super CommentModel> bn3Var) {
final int i = 0;
return ViewModelRequestKt.requestGetWithResponse$default(str, new kh(str, 1), null, new Function1() {
@Override
public final Object invoke(Object obj) {
CommentModel requestCommentMoreDetail$lambda$10;
switch (i) {
case 0:
requestCommentMoreDetail$lambda$10 = CommentDetailViewModel.requestCommentMoreDetail$lambda$10((JSONObject) obj);
return requestCommentMoreDetail$lambda$10;
case 1:
return Boolean.valueOf(((String) obj).split(",").length == 2);
default:
return ((t75) obj).h;
}
}
}, bn3Var, 4, null);
}
public static final CommentModel requestCommentMoreDetail$lambda$10(JSONObject jSONObject) {
return CommentModel.INSTANCE.initFromJson(jSONObject);
}
public static final boolean requestCommentMoreDetail$lambda$9(String str) {
return str == null || str.length() == 0;
}
public final Object requestCommentMoreReplies(final String str, String str2, bn3<? super ReplyCommentModel> bn3Var) {
final int i = 0;
return ViewModelRequestKt.requestGetWithResponse$default(str, new Function0() {
@Override
public final Object invoke() {
boolean requestCommentMoreReplies$lambda$23;
n85 c;
Object obj = str;
switch (i) {
case 0:
requestCommentMoreReplies$lambda$23 = CommentDetailViewModel.requestCommentMoreReplies$lambda$23((String) obj);
return Boolean.valueOf(requestCommentMoreReplies$lambda$23);
case 1:
return new rp3(((up3) obj).a);
default:
int i2 = VideoClipActivity.H;
VideoClipActivity videoClipActivity = (VideoClipActivity) obj;
kii viewModelStore = videoClipActivity.getViewModelStore();
hii defaultViewModelProviderFactory = videoClipActivity.getDefaultViewModelProviderFactory();
gw3 defaultViewModelCreationExtras = videoClipActivity.getDefaultViewModelCreationExtras();
mu9 kotlinClass = JvmClassMappingKt.getKotlinClass(n85.class);
String k = kotlinClass.k();
if (k == null) {
throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels");
}
String concat = "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(k);
n85 b = viewModelStore.b(concat);
if (!kotlinClass.i(b)) {
o2c o2cVar = new o2c(defaultViewModelCreationExtras);
o2cVar.a(jii.a, concat);
try {
try {
c = defaultViewModelProviderFactory.b(kotlinClass, o2cVar);
} catch (AbstractMethodError unused) {
c = defaultViewModelProviderFactory.a(JvmClassMappingKt.getJavaClass(kotlinClass), o2cVar);
}
} catch (AbstractMethodError unused2) {
c = defaultViewModelProviderFactory.c(JvmClassMappingKt.getJavaClass(kotlinClass));
}
b = c;
aii aiiVar = (aii) viewModelStore.a.put(concat, b);
if (aiiVar != null) {
aiiVar.clear$lifecycle_viewmodel_release();
}
} else if (defaultViewModelProviderFactory instanceof hii) {
defaultViewModelProviderFactory.d(b);
}
return b;
}
}
}, null, new dc1(str2, 2), bn3Var, 4, null);
}
public static final boolean requestCommentMoreReplies$lambda$23(String str) {
return str == null || str.length() == 0;
}
public static final ReplyCommentModel requestCommentMoreReplies$lambda$26(String str, JSONObject jSONObject) {
ReplyCommentModel initFromJson = ReplyCommentModel.INSTANCE.initFromJson(jSONObject);
initFromJson.setId(str);
Iterator<T> it = initFromJson.getResources().iterator();
while (it.hasNext()) {
((ReplyCommentItem) it.next()).setParentId(str);
}
return initFromJson;
}
public final Object requestCommentReplyFirst(String str, String str2, String str3, String str4, bn3<? super ReplyCommentItem> bn3Var) {
return ViewModelRequestKt.requestPostWithResponse$default("https://androidapi.mxplay.com/v1/comment/reply", o6b.d(new Pair(CommentDetailFragment.V_ID, str), new Pair(CommentDetailFragment.V_TYPE, str2), new Pair("comment", str3), new Pair("content", str4)), null, null, new ai1(1, str3, str4), bn3Var, 12, null);
}
public static final ReplyCommentItem requestCommentReplyFirst$lambda$20(String str, String str2, JSONObject jSONObject) {
ReplyCommentItem initFromJson = ReplyCommentItem.INSTANCE.initFromJson(jSONObject);
initFromJson.setRcid(str);
initFromJson.setParentId(str);
initFromJson.setContent(str2);
initFromJson.setSelf(true);
l3i l3iVar = a.a;
UserInfo b = l3iVar.b();
initFromJson.setWriterName(String.valueOf(b != null ? b.getName() : null));
UserInfo b2 = l3iVar.b();
initFromJson.setWriterImg(String.valueOf(b2 != null ? b2.getAvatar() : null));
initFromJson.setWriteTime(System.currentTimeMillis());
return initFromJson;
}
public final Object requestCommentReplySecond(String str, String str2, final String str3, final String str4, final String str5, final String str6, bn3<? super ReplyCommentItem> bn3Var) {
return ViewModelRequestKt.requestPostWithResponse$default("https://androidapi.mxplay.com/v1/comment/reply", o6b.d(new Pair(CommentDetailFragment.V_ID, str), new Pair(CommentDetailFragment.V_TYPE, str2), new Pair("comment", str4), new Pair("content", str5)), null, null, new Function1() {
@Override
public final Object invoke(Object obj) {
ReplyCommentItem requestCommentReplySecond$lambda$22;
String str7 = str6;
String str8 = str3;
requestCommentReplySecond$lambda$22 = CommentDetailViewModel.requestCommentReplySecond$lambda$22(str4, str7, str8, str5, (JSONObject) obj);
return requestCommentReplySecond$lambda$22;
}
}, bn3Var, 12, null);
}
public static final ReplyCommentItem requestCommentReplySecond$lambda$22(String str, String str2, String str3, String str4, JSONObject jSONObject) {
ReplyCommentItem initFromJson = ReplyCommentItem.INSTANCE.initFromJson(jSONObject);
initFromJson.setRcid(str);
initFromJson.setParentId(str2);
initFromJson.setReplyTo(str3);
initFromJson.setContent(str4);
initFromJson.setSelf(true);
l3i l3iVar = a.a;
UserInfo b = l3iVar.b();
initFromJson.setWriterName(String.valueOf(b != null ? b.getName() : null));
UserInfo b2 = l3iVar.b();
initFromJson.setWriterImg(String.valueOf(b2 != null ? b2.getAvatar() : null));
initFromJson.setWriteTime(System.currentTimeMillis());
return initFromJson;
}
public final Object requestPinTopCommentDetail(String str, bn3<? super CommentModel> bn3Var) {
final int i = 0;
return ViewModelRequestKt.requestGetWithResponse$default(str, new y73(str, 0), null, new Function1() {
@Override
public final Object invoke(Object obj) {
CommentModel requestPinTopCommentDetail$lambda$3;
switch (i) {
case 0:
requestPinTopCommentDetail$lambda$3 = CommentDetailViewModel.requestPinTopCommentDetail$lambda$3((JSONObject) obj);
return requestPinTopCommentDetail$lambda$3;
case 1:
return Unit.INSTANCE;
default:
t75 t75Var = (t75) obj;
return Double.valueOf(t75Var.c ? 6.0d : new on3(87.0d, 87.0d, 80.0d, 75.0d).a(t75Var.d));
}
}
}, bn3Var, 4, null);
}
public static final boolean requestPinTopCommentDetail$lambda$2(String str) {
return str == null || str.length() == 0;
}
public static final CommentModel requestPinTopCommentDetail$lambda$3(JSONObject jSONObject) {
return CommentModel.INSTANCE.initPinTopJson(jSONObject);
}
@NotNull
public final c3c<CommentItem> getCommentAddLiveData() {
return this.commentAddLiveData;
}
@NotNull
public final c3c<DeleteItem> getCommentDeleteLiveData() {
return this.commentDeleteLiveData;
}
@NotNull
public final c3c<CommentModel> getCommentDetailLiveData() {
return this.commentDetailLiveData;
}
@NotNull
public final c3c<LikeItem> getCommentLikeLiveData() {
return this.commentLikeLiveData;
}
@NotNull
public final c3c<CommentModel> getCommentMoreDetailLiveData() {
return this.commentMoreDetailLiveData;
}
@NotNull
public final c3c<ReplyCommentModel> getCommentMoreReplyLiveData() {
return this.commentMoreReplyLiveData;
}
@NotNull
public final c3c<CommentModel> getCommentPinTopLiveData() {
return this.commentPinTopLiveData;
}
@NotNull
public final c3c<ReplyCommentItem> getCommentReplyFirstLiveData() {
return this.commentReplyFirstLiveData;
}
@NotNull
public final c3c<ReplyCommentItem> getCommentReplySecondLiveData() {
return this.commentReplySecondLiveData;
}
public final void launchAdd(@NotNull String vid, @NotNull String vtype, @NotNull String content) {
ViewModelRequestKt.launchWithoutKey(jz9.I(this), this.commentAddLiveData, new CommentDetailViewModel$launchAdd$1(this, vid, vtype, content, null));
}
public final void launchDelete(@NotNull String vid, @NotNull String vtype, @NotNull String comment, int type, @NotNull String parentId, @NotNull String rcid) {
ViewModelRequestKt.launchWithKey(jz9.I(this), rg2.d(comment, DeleteItem.TAG), this.commentDeleteLiveData, this.loadingLiveData, new CommentDetailViewModel$launchDelete$1(this, vid, vtype, comment, type, parentId, rcid, null));
}
public final void launchLike(@NotNull String vid, @NotNull String vtype, @NotNull String comment, int change, int type, @NotNull String parentId) {
ViewModelRequestKt.launchWithKey(jz9.I(this), rg2.d(comment, LikeItem.TAG), this.commentLikeLiveData, this.loadingLiveData, new CommentDetailViewModel$launchLike$1(this, vid, vtype, comment, change, type, parentId, null));
}
public final void launchMoreReplies(@NotNull String repliesUrl, @NotNull String comment) {
ViewModelRequestKt.launchWithKey(jz9.I(this), repliesUrl, this.commentMoreReplyLiveData, this.loadingLiveData, new CommentDetailViewModel$launchMoreReplies$1(this, repliesUrl, comment, null));
}
public final void launchMoreRequest(@NotNull String moreUrl) {
ViewModelRequestKt.launchWithKey(jz9.I(this), moreUrl, this.commentMoreDetailLiveData, this.loadingLiveData, new CommentDetailViewModel$launchMoreRequest$1(this, moreUrl, null));
}
public final void launchPinTopRequest(String commentUrl, String pinTopUrl, String cid) {
ViewModelRequestKt.launchWithKey(jz9.I(this), rg2.d(commentUrl, pinTopUrl), this.commentPinTopLiveData, this.loadingLiveData, new CommentDetailViewModel$launchPinTopRequest$1(this, cid, commentUrl, pinTopUrl, null));
}
public final void launchReplyFirst(@NotNull String vid, @NotNull String vtype, @NotNull String comment, @NotNull String content) {
ViewModelRequestKt.launchWithoutKey(jz9.I(this), this.commentReplyFirstLiveData, new CommentDetailViewModel$launchReplyFirst$1(this, vid, vtype, comment, content, null));
}
public final void launchReplySecond(@NotNull String vid, @NotNull String vtype, @NotNull String replyTo, @NotNull String comment, @NotNull String content, @NotNull String parentId) {
ViewModelRequestKt.launchWithoutKey(jz9.I(this), this.commentReplySecondLiveData, new CommentDetailViewModel$launchReplySecond$1(this, vid, vtype, replyTo, comment, content, parentId, null));
}
public final void launchRequest(@NotNull String commentUrl) {
ViewModelRequestKt.launchWithKey(jz9.I(this), commentUrl, this.commentDetailLiveData, this.loadingLiveData, new CommentDetailViewModel$launchRequest$1(this, commentUrl, null));
}
public void onCleared() {
super.onCleared();
this.loadingLiveData.onCleared();
}
public final void setCommentAddLiveData(@NotNull c3c<CommentItem> c3cVar) {
this.commentAddLiveData = c3cVar;
}
public final void setCommentDeleteLiveData(@NotNull c3c<DeleteItem> c3cVar) {
this.commentDeleteLiveData = c3cVar;
}
public final void setCommentDetailLiveData(@NotNull c3c<CommentModel> c3cVar) {
this.commentDetailLiveData = c3cVar;
}
public final void setCommentLikeLiveData(@NotNull c3c<LikeItem> c3cVar) {
this.commentLikeLiveData = c3cVar;
}
public final void setCommentMoreDetailLiveData(@NotNull c3c<CommentModel> c3cVar) {
this.commentMoreDetailLiveData = c3cVar;
}
public final void setCommentMoreReplyLiveData(@NotNull c3c<ReplyCommentModel> c3cVar) {
this.commentMoreReplyLiveData = c3cVar;
}
public final void setCommentPinTopLiveData(@NotNull c3c<CommentModel> c3cVar) {
this.commentPinTopLiveData = c3cVar;
}
public final void setCommentReplyFirstLiveData(@NotNull c3c<ReplyCommentItem> c3cVar) {
this.commentReplyFirstLiveData = c3cVar;
}
public final void setCommentReplySecondLiveData(@NotNull c3c<ReplyCommentItem> c3cVar) {
this.commentReplySecondLiveData = c3cVar;
}
}