四虎影院 v4.1.6版本的 MD5 值为:3c86dc44d368396917a29935d39af88b
以下内容为反编译后的 UserFragment.java 源代码,内容仅作参考
package cn.luckxy.vod.ui.user;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.core.app.NotificationCompat;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import cn.luckxy.vod.App;
import cn.luckxy.vod.bean.GetScoreBean;
import cn.luckxy.vod.bean.GroupChatBean;
import cn.luckxy.vod.bean.LoginBean;
import cn.luckxy.vod.bean.LogoutBean;
import cn.luckxy.vod.bean.OpenShareEvent;
import cn.luckxy.vod.bean.Page;
import cn.luckxy.vod.bean.PlayLogBean;
import cn.luckxy.vod.bean.PlayScoreBean;
import cn.luckxy.vod.bean.StartBean;
import cn.luckxy.vod.bean.UserInfoBean;
import cn.luckxy.vod.ui.account.AccountSettingActivity;
import cn.luckxy.vod.ui.collection.CollectionActivity;
import cn.luckxy.vod.ui.down.AllDownloadActivity;
import cn.luckxy.vod.ui.expand.ExpandCenterActivity;
import cn.luckxy.vod.ui.expand.MyExpandActivity;
import cn.luckxy.vod.ui.login.LoginActivity;
import cn.luckxy.vod.ui.notice.MessageCenterActivity;
import cn.luckxy.vod.ui.pay.PayActivity;
import cn.luckxy.vod.ui.play.PlayActivity;
import cn.luckxy.vod.ui.score.PlayScoreActivity;
import cn.luckxy.vod.ui.share.ShareActivity;
import cn.luckxy.vod.ui.task.TaskActivity2;
import cn.luckxy.vod.ui.withdraw.GoldWithdrawActivity;
import cn.luckxy.vod.utils.LoginUtils;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.github.StormWyrm.wanandroid.base.fragment.BaseFragment;
import com.movie.all.R;
import com.umeng.commonsdk.statistics.common.HelperUtils;
import g.a.b.netservice.VodService;
import g.a.b.utils.UserUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.JvmField;
import kotlin.jvm.JvmStatic;
import kotlin.n0;
import kotlin.reflect.KProperty;
import kotlin.text.c0;
import kotlin.v1.internal.c1;
import kotlin.v1.internal.g1;
import kotlin.v1.internal.h1;
import kotlin.v1.internal.i0;
import kotlin.v1.internal.j0;
import l.a.a.a.l;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.litepal.LitePal;
import org.litepal.parser.LitePalParser;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000h\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u0000 ;2\u00020\u0001:\u0003;<=B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\u001d\u001a\u00020\u001eH\u0002J\b\u0010\u001f\u001a\u00020 H\u0016J\b\u0010!\u001a\u00020\u001eH\u0002J\u000e\u0010\"\u001a\u00020\u001e2\u0006\u0010#\u001a\u00020$J\b\u0010%\u001a\u00020\u001eH\u0014J\b\u0010&\u001a\u00020\u001eH\u0014J\"\u0010'\u001a\u00020\u001e2\u0006\u0010(\u001a\u00020 2\u0006\u0010)\u001a\u00020 2\b\u0010*\u001a\u0004\u0018\u00010+H\u0016J\u0010\u0010,\u001a\u00020\u001e2\u0006\u0010-\u001a\u00020\u0004H\u0016J\u0014\u0010.\u001a\u00020\u001e2\n\b\u0002\u0010*\u001a\u0004\u0018\u00010/H\u0007J\u0014\u00100\u001a\u00020\u001e2\n\b\u0002\u0010*\u001a\u0004\u0018\u000101H\u0007J\u0010\u00102\u001a\u00020\u001e2\u0006\u00103\u001a\u000204H\u0007J\b\u00105\u001a\u00020\u001eH\u0016J\u0010\u00106\u001a\u00020\u001e2\u0006\u00107\u001a\u00020\u0004H\u0016J\b\u00108\u001a\u00020\u001eH\u0002J\u0014\u00109\u001a\u00020\u001e2\n\b\u0002\u0010*\u001a\u0004\u0018\u00010:H\u0002R\u001a\u0010\u0003\u001a\u00020\u0004X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0003\u0010\u0005\"\u0004\b\u0006\u0010\u0007R\u001a\u0010\b\u001a\u00020\u0004X\u0096\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\b\u0010\u0005\"\u0004\b\t\u0010\u0007R\u001a\u0010\n\u001a\u00020\u000bX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\f\u0010\r\"\u0004\b\u000e\u0010\u000fR\u001b\u0010\u0010\u001a\u00020\u00118BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0014\u0010\u0015\u001a\u0004\b\u0012\u0010\u0013R\u001a\u0010\u0016\u001a\u00020\u0017X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0018\u0010\u0019\"\u0004\b\u001a\u0010\u001bR\u0012\u0010\u001c\u001a\u00020\u00008\u0006@\u0006X\u0087\u000e¢\u0006\u0002\n\u0000¨\u0006>"}, d2 = {"Lcn/luckxy/vod/ui/user/UserFragment;", "Lcom/github/StormWyrm/wanandroid/base/fragment/BaseFragment;", "()V", "isInit", "", "()Z", "setInit", "(Z)V", "isUseEventBus", "setUseEventBus", "mHandler", "Landroid/os/Handler;", "getMHandler", "()Landroid/os/Handler;", "setMHandler", "(Landroid/os/Handler;)V", "playScoreAdapter", "Lcn/luckxy/vod/ui/user/UserFragment$PlayScoreAdapter;", "getPlayScoreAdapter", "()Lcn/luckxy/vod/ui/user/UserFragment$PlayScoreAdapter;", "playScoreAdapter$delegate", "Lkotlin/Lazy;", "playVideoReceiver", "Lcn/luckxy/vod/ui/user/UserFragment$PlayVideoReceiver;", "getPlayVideoReceiver", "()Lcn/luckxy/vod/ui/user/UserFragment$PlayVideoReceiver;", "setPlayVideoReceiver", "(Lcn/luckxy/vod/ui/user/UserFragment$PlayVideoReceiver;)V", "userFragment", "getGroupChatList", "", "getLayoutId", "", "getPlayScore", "gotoWeb", "url", "", "initListener", "initView", "onActivityResult", "requestCode", "resultCode", "data", "Landroid/content/Intent;", "onHiddenChanged", "hidden", "onLoginSucces", "Lcn/luckxy/vod/bean/LoginBean;", "onLogout", "Lcn/luckxy/vod/bean/LogoutBean;", "onOpenShareEvent", NotificationCompat.CATEGORY_EVENT, "Lcn/luckxy/vod/bean/OpenShareEvent;", "onResume", "setUserVisibleHint", "isVisibleToUser", "sign", "updateUserInfo", "Lcn/luckxy/vod/bean/UserInfoBean;", "Companion", "PlayScoreAdapter", "PlayVideoReceiver", "app_release"}, k = 1, mv = {1, 1, 15})
public final class UserFragment extends BaseFragment {
public static final KProperty[] f3651s = {h1.a(new c1(h1.b(UserFragment.class), "playScoreAdapter", "getPlayScoreAdapter()Lcn/luckxy/vod/ui/user/UserFragment$PlayScoreAdapter;"))};
public static final a t = new a(null);
public boolean f3654n;
public HashMap f3658r;
public final kotlin.k f3652l = kotlin.n.a(new x());
public boolean f3653m = true;
@JvmField
@NotNull
public UserFragment f3655o = this;
@NotNull
public PlayVideoReceiver f3656p = new PlayVideoReceiver();
@NotNull
public Handler f3657q = new v();
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0018\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0016¨\u0006\t"}, d2 = {"Lcn/luckxy/vod/ui/user/UserFragment$PlayVideoReceiver;", "Landroid/content/BroadcastReceiver;", "()V", "onReceive", "", com.umeng.analytics.pro.b.Q, "Landroid/content/Context;", "intent", "Landroid/content/Intent;", "app_release"}, k = 1, mv = {1, 1, 15})
public static final class PlayVideoReceiver extends BroadcastReceiver {
@Override
public void onReceive(@NotNull Context context, @NotNull Intent intent) {
i0.f(context, com.umeng.analytics.pro.b.Q);
i0.f(intent, "intent");
Log.i(PlayVideoReceiver.class.getName().toString(), "onReceive playscore");
}
}
public static final class a {
public a() {
}
@JvmStatic
@NotNull
public final UserFragment a() {
Bundle bundle = new Bundle();
UserFragment userFragment = new UserFragment();
userFragment.setArguments(bundle);
return userFragment;
}
public a(kotlin.v1.internal.v vVar) {
this();
}
}
public static final class b extends BaseQuickAdapter<PlayScoreBean, BaseViewHolder> {
public b() {
super(R.layout.item_play_score_horizontal);
}
@Override
public void convert(@NotNull BaseViewHolder baseViewHolder, @Nullable PlayScoreBean playScoreBean) {
String str;
i0.f(baseViewHolder, HelperUtils.TAG);
if (playScoreBean != null) {
if (playScoreBean.getTypeId() == 3) {
str = playScoreBean.getVodName() + ' ' + playScoreBean.getVodSelectedWorks();
} else if (playScoreBean.getTypeId() == 1) {
str = String.valueOf(playScoreBean.getVodName());
} else {
str = playScoreBean.getVodName() + ' ' + playScoreBean.getVodSelectedWorks();
}
baseViewHolder.setText(R.id.tvName, str);
StringBuilder sb = new StringBuilder();
sb.append((int) (playScoreBean.getPercentage() * 100));
sb.append('%');
baseViewHolder.setText(R.id.tvPlayProgress, sb.toString());
h.a.a.p.h hVar = new h.a.a.p.h(new h.a.a.p.q.c.j(), new l.a.a.a.l(20, 0, l.b.ALL));
View view = baseViewHolder.itemView;
i0.a((Object) view, "helper.itemView");
h.a.a.k a = h.a.a.c.f(view.getContext()).load(playScoreBean.getVodImgUrl()).a(h.a.a.p.o.j.a).a((h.a.a.t.a<?>) h.a.a.t.h.c(hVar));
View view2 = baseViewHolder.getView(R.id.ivImg);
if (view2 == null) {
throw new n0("null cannot be cast to non-null type android.widget.ImageView");
}
a.a((ImageView) view2);
}
}
}
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001d\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0016J\u0010\u0010\u0007\u001a\u00020\u00042\u0006\u0010\b\u001a\u00020\u0002H\u0016¨\u0006\t"}, d2 = {"cn/luckxy/vod/ui/user/UserFragment$getGroupChatList$1", "Lcom/github/StormWyrm/wanandroid/base/net/observer/BaseObserver;", "Lcn/luckxy/vod/bean/GroupChatBean;", "onError", "", "e", "Lcom/github/StormWyrm/wanandroid/base/exception/ResponseException;", "onSuccess", "data", "app_release"}, k = 1, mv = {1, 1, 15})
public static final class c extends h.e.a.a.a.b.d.a<GroupChatBean> {
public static final class a implements View.OnClickListener {
public final List b;
public a(List list) {
this.b = list;
}
@Override
public final void onClick(View view) {
UserFragment userFragment = UserFragment.this;
Object obj = this.b.get(0);
i0.a(obj, "list[0]");
String c2 = ((GroupChatBean.ListBean) obj).c();
i0.a((Object) c2, "list[0].url");
userFragment.a(c2);
}
}
public static final class b implements View.OnClickListener {
public final List b;
public b(List list) {
this.b = list;
}
@Override
public final void onClick(View view) {
UserFragment userFragment = UserFragment.this;
Object obj = this.b.get(1);
i0.a(obj, "list[1]");
String c2 = ((GroupChatBean.ListBean) obj).c();
i0.a((Object) c2, "list[1].url");
userFragment.a(c2);
}
}
public c() {
super(false, 1, null);
}
@Override
public void a(@NotNull h.e.a.a.a.exception.d dVar) {
i0.f(dVar, "e");
}
@Override
public void a(@NotNull GroupChatBean groupChatBean) {
i0.f(groupChatBean, "data");
List<GroupChatBean.ListBean> b2 = groupChatBean.b();
i0.a((Object) b2, LitePalParser.NODE_LIST);
int size = b2.size();
for (int i2 = 0; i2 < size; i2++) {
if (i2 == 0) {
LinearLayout linearLayout = (LinearLayout) UserFragment.this.a(cn.luckxy.vod.R.id.llPotato);
i0.a((Object) linearLayout, "llPotato");
linearLayout.setVisibility(0);
View a2 = UserFragment.this.a(cn.luckxy.vod.R.id.line_potato);
i0.a((Object) a2, "line_potato");
a2.setVisibility(0);
TextView textView = (TextView) UserFragment.this.a(cn.luckxy.vod.R.id.tv_potato);
i0.a((Object) textView, "tv_potato");
GroupChatBean.ListBean listBean = b2.get(0);
i0.a((Object) listBean, "list[0]");
textView.setText(listBean.b());
((LinearLayout) UserFragment.this.a(cn.luckxy.vod.R.id.llPotato)).setOnClickListener(new a(b2));
} else if (i2 == 1) {
LinearLayout linearLayout2 = (LinearLayout) UserFragment.this.a(cn.luckxy.vod.R.id.llPlane);
i0.a((Object) linearLayout2, "llPlane");
linearLayout2.setVisibility(0);
View a3 = UserFragment.this.a(cn.luckxy.vod.R.id.line_plane);
i0.a((Object) a3, "line_plane");
a3.setVisibility(0);
TextView textView2 = (TextView) UserFragment.this.a(cn.luckxy.vod.R.id.tv_plane);
i0.a((Object) textView2, "tv_plane");
GroupChatBean.ListBean listBean2 = b2.get(1);
i0.a((Object) listBean2, "list[1]");
textView2.setText(listBean2.b());
((LinearLayout) UserFragment.this.a(cn.luckxy.vod.R.id.llPlane)).setOnClickListener(new b(b2));
}
}
}
}
public static final class d extends h.e.a.a.a.b.d.b<Page<PlayLogBean>> {
public final g1.h f3661g;
public d(g1.h hVar, Context context) {
super(context, 0, false, false, 14, null);
this.f3661g = hVar;
}
@Override
public void a(@NotNull Page<PlayLogBean> page) {
i0.f(page, "data");
List<PlayLogBean> b = page.b();
i0.a((Object) b, "playLogBeans");
for (PlayLogBean playLogBean : b) {
PlayScoreBean playScoreBean = new PlayScoreBean();
i0.a((Object) playLogBean, "it");
playScoreBean.setVodName(playLogBean.i());
playScoreBean.setVodImgUrl(playLogBean.j());
if (playLogBean.c().equals("NaN")) {
playScoreBean.setPercentage(0.0f);
} else {
try {
String c2 = playLogBean.c();
i0.a((Object) c2, "it.percent");
playScoreBean.setPercentage(Float.parseFloat(c2));
} catch (Exception unused) {
}
}
playScoreBean.setTypeId(playLogBean.f());
String h2 = playLogBean.h();
i0.a((Object) h2, "it.vod_id");
playScoreBean.setVodId(Integer.parseInt(h2));
playScoreBean.setSelect(false);
playScoreBean.setVodSelectedWorks(playLogBean.b().toString());
playScoreBean.setUrlIndex(playLogBean.urlIndex);
playScoreBean.setCurProgress(playLogBean.curProgress);
playScoreBean.setPlaySourceIndex(playLogBean.playSourceIndex);
Log.i("playlog", "playScoreBean" + new h.f.b.f().a(playScoreBean).toString());
((ArrayList) this.f3661g.a).add(playScoreBean);
if (((ArrayList) this.f3661g.a).size() > 10) {
UserFragment.this.r().setNewData(((ArrayList) this.f3661g.a).subList(0, 10));
} else {
UserFragment.this.r().setNewData((ArrayList) this.f3661g.a);
}
}
Log.i("playlog", "getPlayLogList11" + page);
}
@Override
public void a(@NotNull h.e.a.a.a.exception.d dVar) {
i0.f(dVar, "e");
Log.i("playlog", "getPlayLogList222");
}
}
public static final class e implements View.OnClickListener {
public e() {
}
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
return;
}
Intent intent = new Intent(UserFragment.this.getActivity(), (Class<?>) PayActivity.class);
intent.putExtra("type", 1);
ActivityUtils.startActivity(intent);
}
}
public static final class f implements View.OnClickListener {
public static final f a = new f();
@Override
public final void onClick(View view) {
CollectionActivity.f3215l.a();
}
}
public static final class g implements View.OnClickListener {
public g() {
}
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
} else {
UserFragment.this.startActivityForResult(new Intent(UserFragment.this.getActivity(), (Class<?>) PlayScoreActivity.class), 2);
}
}
}
public static final class h implements View.OnClickListener {
public h() {
}
@Override
public final void onClick(View view) {
LitePal.deleteAll((Class<?>) PlayScoreBean.class, new String[0]);
ToastUtils.showShort("已清除缓存", new Object[0]);
UserFragment.this.q();
}
}
public static final class i implements View.OnClickListener {
public i() {
}
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
} else {
UserFragment.this.startActivity(new Intent(UserFragment.this.getActivity(), (Class<?>) MessageCenterActivity.class));
}
}
}
public static final class j implements View.OnClickListener {
public j() {
}
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
} else {
UserFragment.this.startActivity(new Intent(UserFragment.this.getActivity(), (Class<?>) MyExpandActivity.class));
}
}
}
public static final class k implements View.OnClickListener {
public k() {
}
@Override
public final void onClick(View view) {
FragmentActivity activity;
if (!LoginUtils.b(UserFragment.this.getActivity()) || (activity = UserFragment.this.getActivity()) == null) {
return;
}
AllDownloadActivity.a aVar = AllDownloadActivity.f3227j;
i0.a((Object) activity, "it1");
aVar.a(activity);
}
}
public static final class l implements View.OnClickListener {
public static final l a = new l();
@Override
public final void onClick(View view) {
LoginActivity.f3338o.a();
}
}
public static final class m implements View.OnClickListener {
public static final m a = new m();
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
} else {
ActivityUtils.startActivity((Class<? extends Activity>) AccountSettingActivity.class);
}
}
}
public static final class n implements View.OnClickListener {
public static final n a = new n();
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
} else {
TaskActivity2.f3646i.a();
}
}
}
public static final class o implements View.OnClickListener {
public o() {
}
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
} else {
Toast.makeText(UserFragment.this.getActivity(), "分享", 0).show();
ActivityUtils.startActivity((Class<? extends Activity>) ShareActivity.class);
}
}
}
public static final class p implements View.OnClickListener {
public p() {
}
@Override
public final void onClick(View view) {
String str;
String str2;
Intent intent;
StartBean startBean = App.f3140f;
if (startBean != null) {
i0.a((Object) startBean, "App.startBean");
if (startBean.a() != null) {
StartBean startBean2 = App.f3140f;
i0.a((Object) startBean2, "App.startBean");
StartBean.Ads a = startBean2.a();
i0.a((Object) a, "App.startBean.ads");
if (a.f() != null) {
StartBean startBean3 = App.f3140f;
i0.a((Object) startBean3, "App.startBean");
StartBean.Ads a2 = startBean3.a();
i0.a((Object) a2, "App.startBean.ads");
StartBean.Ad f2 = a2.f();
i0.a((Object) f2, "App.startBean.ads.service_qq");
if (f2.a() != null) {
StartBean startBean4 = App.f3140f;
i0.a((Object) startBean4, "App.startBean");
StartBean.Ads a3 = startBean4.a();
i0.a((Object) a3, "App.startBean.ads");
StartBean.Ad f3 = a3.f();
i0.a((Object) f3, "App.startBean.ads.service_qq");
str = f3.a();
i0.a((Object) str, "App.startBean.ads.service_qq.description");
str2 = str;
if (c0.c((CharSequence) str2, (CharSequence) "uin=", false, 2, (Object) null)) {
str2 = (String) c0.a((CharSequence) str2, new String[]{"uin="}, false, 0, 6, (Object) null).get(1);
}
if (c0.c((CharSequence) str2, (CharSequence) "&site", false, 2, (Object) null)) {
c0.a((CharSequence) str2, new String[]{"&site"}, false, 0, 6, (Object) null).get(0);
}
intent = new Intent("android.intent.action.VIEW", Uri.parse("mqq://im/chat?chat_type=wpa&uin=" + str2 + "&version=1&src_type=web"));
if (intent.resolveActivity(UserFragment.this.d().getPackageManager()) == null) {
ActivityUtils.startActivity(intent);
return;
} else {
ToastUtils.showShort("未安装QQ!!", new Object[0]);
return;
}
}
}
}
}
str = "";
str2 = str;
if (c0.c((CharSequence) str2, (CharSequence) "uin=", false, 2, (Object) null)) {
}
if (c0.c((CharSequence) str2, (CharSequence) "&site", false, 2, (Object) null)) {
}
intent = new Intent("android.intent.action.VIEW", Uri.parse("mqq://im/chat?chat_type=wpa&uin=" + str2 + "&version=1&src_type=web"));
if (intent.resolveActivity(UserFragment.this.d().getPackageManager()) == null) {
}
}
}
public static final class q implements View.OnClickListener {
public static final q a = new q();
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
} else {
ActivityUtils.startActivity((Class<? extends Activity>) GoldWithdrawActivity.class);
}
}
}
public static final class r implements View.OnClickListener {
public r() {
}
@Override
public final void onClick(View view) {
if (UserUtils.d()) {
UserFragment.this.t();
} else {
LoginActivity.f3338o.a();
}
}
}
public static final class s implements View.OnClickListener {
public s() {
}
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
return;
}
Intent intent = new Intent(UserFragment.this.getActivity(), (Class<?>) PayActivity.class);
intent.putExtra("type", 0);
ActivityUtils.startActivity(intent);
}
}
public static final class t implements View.OnClickListener {
public t() {
}
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
return;
}
Intent intent = new Intent(UserFragment.this.getActivity(), (Class<?>) PayActivity.class);
intent.putExtra("type", 0);
ActivityUtils.startActivity(intent);
}
}
public static final class u implements View.OnClickListener {
public u() {
}
@Override
public final void onClick(View view) {
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
} else {
ActivityUtils.startActivity(new Intent(UserFragment.this.getActivity(), (Class<?>) ExpandCenterActivity.class));
}
}
}
public static final class v extends Handler {
public v() {
}
@Override
public void handleMessage(@NotNull Message message) {
i0.f(message, NotificationCompat.CATEGORY_MESSAGE);
super.handleMessage(message);
if (message.what != 1) {
return;
}
UserFragment.this.q();
}
}
public static final class w extends h.e.a.a.a.b.d.a<UserInfoBean> {
public w() {
super(false, 1, null);
}
@Override
public void a(@NotNull h.e.a.a.a.exception.d dVar) {
i0.f(dVar, "e");
}
@Override
public void a(@NotNull UserInfoBean userInfoBean) {
i0.f(userInfoBean, "data");
UserFragment.this.a(userInfoBean);
UserUtils.a(userInfoBean);
UserFragment.this.q();
EventBus.getDefault().post(userInfoBean);
}
}
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcn/luckxy/vod/ui/user/UserFragment$PlayScoreAdapter;", "invoke"}, k = 3, mv = {1, 1, 15})
public static final class x extends j0 implements kotlin.v1.c.a<b> {
public static final class a implements BaseQuickAdapter.OnItemClickListener {
public a() {
}
@Override
public final void onItemClick(BaseQuickAdapter<Object, BaseViewHolder> baseQuickAdapter, View view, int i2) {
Object item = baseQuickAdapter.getItem(i2);
if (item != null) {
PlayScoreBean playScoreBean = (PlayScoreBean) item;
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
return;
} else {
App.f3146l = playScoreBean;
PlayActivity.a(UserFragment.this, playScoreBean.getVodId());
return;
}
}
throw new n0("null cannot be cast to non-null type cn.luckxy.vod.bean.PlayScoreBean");
}
}
public x() {
super(0);
}
@Override
@NotNull
public final b i() {
b bVar = new b();
bVar.setOnItemClickListener(new a());
return bVar;
}
}
public static final class y extends h.e.a.a.a.b.d.a<GetScoreBean> {
public y() {
super(false, 1, null);
}
@Override
public void a(@NotNull GetScoreBean getScoreBean) {
i0.f(getScoreBean, "data");
if (i0.a((Object) getScoreBean.a(), (Object) "0")) {
ToastUtils.showShort(R.string.sign_success);
} else {
ToastUtils.showShort("签到成功,获得" + getScoreBean.a() + "积分", new Object[0]);
}
UserFragment.a(UserFragment.this, (LoginBean) null, 1, (Object) null);
}
@Override
public void a(@NotNull h.e.a.a.a.exception.d dVar) {
i0.f(dVar, "e");
ToastUtils.showShort(dVar.b(), new Object[0]);
}
}
private final void p() {
VodService vodService = (VodService) g.a.b.utils.j.INSTANCE.a(VodService.class);
if (g.a.b.utils.a.a(vodService)) {
return;
}
h.e.a.a.a.b.a.a(this, vodService.h(), new c());
}
public final void q() {
g1.h hVar = new g1.h();
hVar.a = new ArrayList();
if (UserUtils.d()) {
VodService vodService = (VodService) g.a.b.utils.j.INSTANCE.a(VodService.class);
if (g.a.b.utils.a.a(vodService)) {
return;
}
h.e.a.a.a.b.a.a(this, vodService.e("1", "12"), new d(hVar, d()));
}
}
public final b r() {
kotlin.k kVar = this.f3652l;
KProperty kProperty = f3651s[0];
return (b) kVar.getValue();
}
@JvmStatic
@NotNull
public static final UserFragment s() {
return t.a();
}
public final void t() {
VodService vodService = (VodService) g.a.b.utils.j.INSTANCE.a(VodService.class);
if (g.a.b.utils.a.a(vodService)) {
return;
}
h.e.a.a.a.b.a.a(this, vodService.t(), new y());
}
@Override
public View a(int i2) {
if (this.f3658r == null) {
this.f3658r = new HashMap();
}
View view = (View) this.f3658r.get(Integer.valueOf(i2));
if (view != null) {
return view;
}
View view2 = getView();
if (view2 == null) {
return null;
}
View findViewById = view2.findViewById(i2);
this.f3658r.put(Integer.valueOf(i2), findViewById);
return findViewById;
}
@Override
public void a() {
HashMap hashMap = this.f3658r;
if (hashMap != null) {
hashMap.clear();
}
}
@Override
public int c() {
return R.layout.fragment_user;
}
@Override
public void f() {
super.f();
((TextView) a(cn.luckxy.vod.R.id.tvLogin)).setOnClickListener(l.a);
((ImageView) a(cn.luckxy.vod.R.id.iv_user_pic)).setOnClickListener(m.a);
((TextView) a(cn.luckxy.vod.R.id.tv_user_task)).setOnClickListener(n.a);
((TextView) a(cn.luckxy.vod.R.id.tv_user_share)).setOnClickListener(new o());
((TextView) a(cn.luckxy.vod.R.id.tv_user_service)).setOnClickListener(new p());
((TextView) a(cn.luckxy.vod.R.id.tv_coin_withdraw)).setOnClickListener(q.a);
((TextView) a(cn.luckxy.vod.R.id.tv_user_sign)).setOnClickListener(new r());
((TextView) a(cn.luckxy.vod.R.id.tv_user_t1)).setOnClickListener(new s());
((TextView) a(cn.luckxy.vod.R.id.tv_user_t2)).setOnClickListener(new t());
((TextView) a(cn.luckxy.vod.R.id.tv_user_t3)).setOnClickListener(new e());
((LinearLayout) a(cn.luckxy.vod.R.id.llCollect)).setOnClickListener(f.a);
((LinearLayout) a(cn.luckxy.vod.R.id.llPlayScore)).setOnClickListener(new g());
((LinearLayout) a(cn.luckxy.vod.R.id.llClear)).setOnClickListener(new h());
((LinearLayout) a(cn.luckxy.vod.R.id.llNotice)).setOnClickListener(new i());
((LinearLayout) a(cn.luckxy.vod.R.id.llExpand)).setOnClickListener(new j());
((LinearLayout) a(cn.luckxy.vod.R.id.llCache)).setOnClickListener(new k());
}
@Override
public void h() {
String str;
StartBean.Ads a2;
StartBean.Document d2;
StartBean.Register a3;
super.h();
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("android.intent.action.AddPlayScore");
d().registerReceiver(this.f3656p, intentFilter);
StartBean startBean = App.f3140f;
if (startBean == null || (d2 = startBean.d()) == null || (a3 = d2.a()) == null || (str = a3.a()) == null) {
str = "";
}
boolean z = true;
if (str.length() > 0) {
TextView textView = (TextView) a(cn.luckxy.vod.R.id.tv_user_tip);
i0.a((Object) textView, "tv_user_tip");
textView.setText(str);
}
RecyclerView recyclerView = (RecyclerView) a(cn.luckxy.vod.R.id.rvPlayScore);
i0.a((Object) recyclerView, "rvPlayScore");
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.setOrientation(0);
recyclerView.setLayoutManager(linearLayoutManager);
RecyclerView recyclerView2 = (RecyclerView) a(cn.luckxy.vod.R.id.rvPlayScore);
i0.a((Object) recyclerView2, "rvPlayScore");
recyclerView2.setAdapter(r());
StartBean startBean2 = App.f3140f;
StartBean.Ad k2 = (startBean2 == null || (a2 = startBean2.a()) == null) ? null : a2.k();
if (k2 != null && k2.d() != 0) {
String a4 = k2.a();
if (a4 != null && a4.length() != 0) {
z = false;
}
if (!z) {
ImageView imageView = (ImageView) a(cn.luckxy.vod.R.id.awvUser);
i0.a((Object) imageView, "awvUser");
imageView.setVisibility(0);
((ImageView) a(cn.luckxy.vod.R.id.awvUser)).setOnClickListener(new u());
i0.a((Object) h.a.a.c.f(e()).load(k2.a()).a((ImageView) a(cn.luckxy.vod.R.id.awvUser)), "Glide.with(mContext).loa…escription).into(awvUser)");
p();
}
}
ImageView imageView2 = (ImageView) a(cn.luckxy.vod.R.id.awvUser);
i0.a((Object) imageView2, "awvUser");
imageView2.setVisibility(8);
p();
}
@Override
public boolean getF5753c() {
return this.f3653m;
}
@NotNull
public final Handler getF3657q() {
return this.f3657q;
}
@NotNull
public final PlayVideoReceiver getF3656p() {
return this.f3656p;
}
public final boolean getF3654n() {
return this.f3654n;
}
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 1 || requestCode == 2) {
q();
}
}
@Override
public void onDestroyView() {
super.onDestroyView();
a();
}
@Override
public void onHiddenChanged(boolean hidden) {
super.onHiddenChanged(hidden);
}
@Subscribe
public final void onLoginSucces(@Nullable LoginBean data) {
VodService vodService = (VodService) g.a.b.utils.j.INSTANCE.a(VodService.class);
if (g.a.b.utils.a.a(vodService)) {
return;
}
h.e.a.a.a.b.a.a(this, vodService.r(), new w());
}
@Subscribe
public final void onLogout(@Nullable LogoutBean data) {
UserUtils.a((UserInfoBean) null);
a(this, (UserInfoBean) null, 1, (Object) null);
}
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
public final void onOpenShareEvent(@NotNull OpenShareEvent event) {
i0.f(event, NotificationCompat.CATEGORY_EVENT);
if (!UserUtils.d()) {
LoginActivity.f3338o.a();
} else {
ActivityUtils.startActivity((Class<? extends Activity>) ShareActivity.class);
}
}
@Override
public void onResume() {
super.onResume();
a(this, (UserInfoBean) null, 1, (Object) null);
q();
if (UserUtils.d()) {
a(this, (LoginBean) null, 1, (Object) null);
}
}
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (isVisibleToUser) {
UserUtils.a((UserInfoBean) null);
a(this, (UserInfoBean) null, 1, (Object) null);
q();
if (UserUtils.d()) {
a(this, (LoginBean) null, 1, (Object) null);
}
}
}
@Override
public void b(boolean z) {
this.f3653m = z;
}
public final void c(boolean z) {
this.f3654n = z;
}
public final void a(@NotNull PlayVideoReceiver playVideoReceiver) {
i0.f(playVideoReceiver, "<set-?>");
this.f3656p = playVideoReceiver;
}
public static void a(UserFragment userFragment, LoginBean loginBean, int i2, Object obj) {
if ((i2 & 1) != 0) {
loginBean = null;
}
userFragment.onLoginSucces(loginBean);
}
public final void a(@NotNull Handler handler) {
i0.f(handler, "<set-?>");
this.f3657q = handler;
}
public static void a(UserFragment userFragment, LogoutBean logoutBean, int i2, Object obj) {
if ((i2 & 1) != 0) {
logoutBean = null;
}
userFragment.onLogout(logoutBean);
}
public static void a(UserFragment userFragment, UserInfoBean userInfoBean, int i2, Object obj) {
if ((i2 & 1) != 0) {
userInfoBean = null;
}
userFragment.a(userInfoBean);
}
public final void a(UserInfoBean userInfoBean) {
if (UserUtils.d()) {
TextView textView = (TextView) a(cn.luckxy.vod.R.id.tvLogin);
i0.a((Object) textView, "tvLogin");
textView.setVisibility(8);
TextView textView2 = (TextView) a(cn.luckxy.vod.R.id.tv_user_name);
i0.a((Object) textView2, "tv_user_name");
textView2.setVisibility(0);
TextView textView3 = (TextView) a(cn.luckxy.vod.R.id.tv_user_tip);
i0.a((Object) textView3, "tv_user_tip");
textView3.setVisibility(0);
} else {
TextView textView4 = (TextView) a(cn.luckxy.vod.R.id.tvLogin);
i0.a((Object) textView4, "tvLogin");
textView4.setVisibility(0);
TextView textView5 = (TextView) a(cn.luckxy.vod.R.id.tv_user_name);
i0.a((Object) textView5, "tv_user_name");
textView5.setVisibility(4);
TextView textView6 = (TextView) a(cn.luckxy.vod.R.id.tv_user_tip);
i0.a((Object) textView6, "tv_user_tip");
textView6.setVisibility(4);
TextView textView7 = (TextView) a(cn.luckxy.vod.R.id.tv_user_jinbi);
i0.a((Object) textView7, "tv_user_jinbi");
textView7.setText("剩余金币 0");
TextView textView8 = (TextView) a(cn.luckxy.vod.R.id.tv_user_jifen);
i0.a((Object) textView8, "tv_user_jifen");
textView8.setText("剩余积分 0");
TextView textView9 = (TextView) a(cn.luckxy.vod.R.id.tv_user_video);
i0.a((Object) textView9, "tv_user_video");
textView9.setText("观影次数 0");
}
if (userInfoBean != null) {
UserInfoBean.GroupBean a2 = userInfoBean.a();
i0.a((Object) a2, "it.group");
String b2 = a2.b();
i0.a((Object) b2, "it.group.group_name");
g.a.b.h.j.b(getActivity(), "isVip", c0.c((CharSequence) b2, (CharSequence) "VIP", false, 2, (Object) null));
TextView textView10 = (TextView) a(cn.luckxy.vod.R.id.tv_user_name);
i0.a((Object) textView10, "tv_user_name");
StringBuilder sb = new StringBuilder();
UserInfoBean.GroupBean a3 = userInfoBean.a();
sb.append(a3 != null ? a3.b() : null);
sb.append((char) 65306);
sb.append(userInfoBean.s());
textView10.setText(sb.toString());
TextView textView11 = (TextView) a(cn.luckxy.vod.R.id.tv_user_name);
i0.a((Object) textView11, "tv_user_name");
StringBuilder sb2 = new StringBuilder();
UserInfoBean.GroupBean a4 = userInfoBean.a();
sb2.append(a4 != null ? a4.b() : null);
sb2.append((char) 65306);
sb2.append(userInfoBean.s());
textView11.setText(sb2.toString());
TextView textView12 = (TextView) a(cn.luckxy.vod.R.id.tv_user_jinbi);
i0.a((Object) textView12, "tv_user_jinbi");
textView12.setText("剩余金币 " + userInfoBean.j());
TextView textView13 = (TextView) a(cn.luckxy.vod.R.id.tv_user_jifen);
i0.a((Object) textView13, "tv_user_jifen");
textView13.setText("剩余积分 " + userInfoBean.z());
TextView textView14 = (TextView) a(cn.luckxy.vod.R.id.tv_user_video);
i0.a((Object) textView14, "tv_user_video");
textView14.setText("观影次数 " + userInfoBean.d());
String B = userInfoBean.B();
i0.a((Object) B, "it.user_portrait");
if (B.length() > 0) {
h.a.a.c.a((FragmentActivity) d()).load("https://cjt521.com/" + userInfoBean.B()).a((h.a.a.t.a<?>) h.a.a.t.h.c(new h.a.a.p.q.c.l())).a((ImageView) a(cn.luckxy.vod.R.id.iv_user_pic));
return;
}
h.a.a.c.a((FragmentActivity) d()).a(Integer.valueOf(R.drawable.ic_default_avator)).a((h.a.a.t.a<?>) h.a.a.t.h.c(new h.a.a.p.q.c.l())).a((ImageView) a(cn.luckxy.vod.R.id.iv_user_pic));
}
}
public final void a(@NotNull String str) {
i0.f(str, "url");
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
intent.setData(Uri.parse(str));
App b2 = App.b();
i0.a((Object) b2, "App.getApplication()");
if (intent.resolveActivity(b2.getPackageManager()) != null) {
startActivity(intent);
}
}
}