CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f

以下内容为反编译后的 MoreHelper.java 源代码,内容仅作参考


package org.godfootsteps.more;

import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.activity.ComponentActivity;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.Toolbar;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.recyclerview.widget.RecyclerView;
import carbon.widget.TextView;
import cn.like.nightmodel.NightModelManager;
import com.blankj.utilcode.util.NetworkUtils;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import d.a.b.o;
import d.a.b.p;
import d.c.a.j.s;
import d.c.a.j.v;
import d.c.g.i3.g;
import d.c.g.l3.k;
import d.c.i.d;
import e.i.b.a;
import e.i.i.a0;
import e.q.i;
import e.q.j;
import e.q.m;
import e.q.n;
import i.c.a.c.c0;
import i.c.a.c.m0;
import i.c.a.c.n0;
import i.c.a.c.r;
import i.c.a.c.w;
import i.c.a.c.y;
import java.lang.ref.WeakReference;
import java.util.Calendar;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import kotlin.Metadata;
import n.e;
import n.i.a.l;
import n.i.b.h;
import org.commons.livechat.ChatBean;
import org.commons.livechat.ChatConfig;
import org.commons.livechat.ChatModel;
import org.godfootsteps.arch.R$id;
import org.godfootsteps.arch.R$string;
import org.godfootsteps.arch.api.AppClient;
import org.godfootsteps.arch.api.model.RecommendApp;
import org.godfootsteps.arch.app.AppUpdater;
import org.godfootsteps.arch.app.LanguageActivity;
import org.godfootsteps.arch.app.MainViewModel;
import org.godfootsteps.arch.base.BaseMainActivity;
import org.godfootsteps.arch.customSystemViews.CustomThumbnailView;
import org.godfootsteps.arch.dialog.AlertDialogBuilder;
import org.godfootsteps.arch.util.GAEventSendUtil;
import org.godfootsteps.arch.view.DotTextView;
import org.godfootsteps.more.FeedbackActivity;
import org.godfootsteps.more.MoreHelper;
import org.godfootsteps.more.R$drawable;
import org.godfootsteps.more.db.UserContext;
import org.godfootsteps.more.db.UserMessageRepository;
import org.godfootsteps.more.db.UserRepository;
import org.godfootsteps.more.entity.UserStatus;
import org.godfootsteps.more.livechat.ChatActivity;
import org.godfootsteps.more.user.MainLoginActivity;
import org.godfootsteps.more.user.UserHelper;
import org.godfootsteps.more.user.UserProfileActivity;
@Metadata(d1 = {"\u0000T\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B1\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0010\b\u0002\u0010\u0004\u001a\n\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0005\u0012\u0010\b\u0002\u0010\u0007\u001a\n\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0005¢\u0006\u0002\u0010\bJ\u0010\u0010\u0016\u001a\u00020\u00062\b\u0010\u0017\u001a\u0004\u0018\u00010\u0018J\u0016\u0010\u0019\u001a\u00020\u00062\u000e\u0010\u001a\u001a\n\u0012\u0004\u0012\u00020\u000b\u0018\u00010\nJ\b\u0010\u001b\u001a\u00020\u0006H\u0007J\u0006\u0010\u001c\u001a\u00020\u0006J\u000e\u0010\u001d\u001a\u00020\u00062\u0006\u0010\u001e\u001a\u00020\u001fJ\b\u0010 \u001a\u00020\u0006H\u0007J\u001a\u0010!\u001a\u00020\u0006*\u00020\u00032\f\u0010\"\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005H\u0002J\f\u0010#\u001a\u00020\u0006*\u00020\u0003H\u0002J\n\u0010$\u001a\u00020\u0006*\u00020%J\u0014\u0010&\u001a\u00020\u0006*\u00020\u00032\u0006\u0010'\u001a\u00020(H\u0002R\u0016\u0010\t\u001a\n\u0012\u0004\u0012\u00020\u000b\u0018\u00010\nX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\rX\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u001c\u0010\u0010\u001a\u0004\u0018\u00010\u0011X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0012\u0010\u0013\"\u0004\b\u0014\u0010\u0015¨\u0006)"}, d2 = {"Lorg/godfootsteps/more/MoreHelper;", "Landroidx/lifecycle/LifecycleObserver;", "drawerLayout", "Landroidx/drawerlayout/widget/DrawerLayout;", "onUserAllowSync", "Lkotlin/Function0;", "", "onInsideChanged", "(Landroidx/drawerlayout/widget/DrawerLayout;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;)V", "aboutAppList", "", "Lorg/godfootsteps/arch/api/model/RecommendApp;", "appUpdater", "Lorg/godfootsteps/arch/app/AppUpdater;", "getDrawerLayout", "()Landroidx/drawerlayout/widget/DrawerLayout;", "shareDialog", "Lcom/google/android/material/bottomsheet/BottomSheetDialog;", "getShareDialog", "()Lcom/google/android/material/bottomsheet/BottomSheetDialog;", "setShareDialog", "(Lcom/google/android/material/bottomsheet/BottomSheetDialog;)V", "bindAppUpdate", "model", "Lorg/godfootsteps/arch/api/model/UpdateInfoModel;", "bindRecommendApp", "recommendApp", "destroy", "hideShareDialog", "onActivityResult", "requestCode", "", "resume", "closeAndStartActivity", "starter", "initClick", "loadProfile", "Landroid/view/View;", "showDrawerDot", "navDotDrawable", "Landroid/graphics/drawable/Drawable;", "more_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class MoreHelper implements i {
    public final DrawerLayout f15988i;
    public final AppUpdater f15989j;
    public BottomSheetDialog f15990k;
    public List<RecommendApp> f15991l;

    @Metadata(d1 = {"\u0000\u0013\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H\u0016J\b\u0010\u0004\u001a\u00020\u0003H\u0016¨\u0006\u0005"}, d2 = {"org/godfootsteps/more/MoreHelper$1$1$1", "Lorg/godfootsteps/arch/app/AppUpdater$VersionCheckListener;", "onCanceled", "", "onUpdateNotice", "more_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
    public static final class a implements AppUpdater.b {
        public final Activity a;
        public final AppUpdater b;

        public a(Activity activity, AppUpdater appUpdater) {
            this.a = activity;
            this.b = appUpdater;
        }

        @Override
        public void a() {
            if (new d.c.a.d.b().o() || n.m.t.a.p.m.e1.a.q1(this.a.getIntent()) || n.m.t.a.p.m.e1.a.p1(this.a.getIntent())) {
                return;
            }
            final AppUpdater appUpdater = this.b;
            Activity activity = appUpdater.f15184i;
            if (activity instanceof j) {
                Lifecycle lifecycle = ((j) activity).getLifecycle();
                h.d(lifecycle, "mActivity as LifecycleOwner).lifecycle");
                n.m.t.a.p.m.e1.a.p(lifecycle, Lifecycle.State.RESUMED, new n.i.a.a<e>() {
                    {
                        super(0);
                    }

                    public final void invoke2() {
                        if (AlertDialogBuilder.f15252w == 0) {
                            AlertDialogBuilder alertDialogBuilder = new AlertDialogBuilder(AppUpdater.this.f15184i, 0, 2);
                            alertDialogBuilder.r(R$string.check_update_available);
                            AppUpdater.a aVar = AppUpdater.this.f15190o;
                            alertDialogBuilder.k(aVar.f15195q.a(aVar, AppUpdater.a.f15191v[3]));
                            alertDialogBuilder.f15258p = (int) (y.e0() * 0.8f);
                            int i2 = R$string.check_update_update_now;
                            final AppUpdater appUpdater2 = AppUpdater.this;
                            alertDialogBuilder.o(i2, new DialogInterface.OnClickListener() {
                                @Override
                                public final void onClick(DialogInterface dialogInterface, int i3) {
                                    AppUpdater appUpdater3 = AppUpdater.this;
                                    n.i.b.h.e(appUpdater3, "this$0");
                                    AppUpdater.c(appUpdater3);
                                }
                            });
                            int i3 = R$string.check_update_later;
                            final AppUpdater appUpdater3 = AppUpdater.this;
                            alertDialogBuilder.l(i3, new DialogInterface.OnClickListener() {
                                @Override
                                public final void onClick(DialogInterface dialogInterface, int i4) {
                                    AppUpdater appUpdater4 = AppUpdater.this;
                                    n.i.b.h.e(appUpdater4, "this$0");
                                    appUpdater4.f15190o.q(false);
                                    AppUpdater.f15183p = true;
                                }
                            });
                            int i4 = R$string.check_update_not_show;
                            final AppUpdater appUpdater4 = AppUpdater.this;
                            alertDialogBuilder.n(i4, new DialogInterface.OnClickListener() {
                                @Override
                                public final void onClick(DialogInterface dialogInterface, int i5) {
                                    AppUpdater appUpdater5 = AppUpdater.this;
                                    n.i.b.h.e(appUpdater5, "this$0");
                                    appUpdater5.f15190o.q(true);
                                    AppUpdater.a aVar2 = appUpdater5.f15190o;
                                    appUpdater5.g(aVar2.f15192n.a(aVar2, AppUpdater.a.f15191v[0]));
                                }
                            });
                            alertDialogBuilder.f98i.f88n = false;
                            alertDialogBuilder.h();
                        }
                    }

                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }
                });
            }
        }

        @Override
        public void onCanceled() {
        }
    }

    @Metadata(d1 = {"\u0000\u0011\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H\u0016¨\u0006\u0004"}, d2 = {"org/godfootsteps/more/MoreHelper$1$6", "Lorg/commons/livechat/ChatObserver;", "onDataChange", "", "more_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
    public static final class b implements o {
        public final DrawerLayout a;
        public final MoreHelper b;
        public final Drawable c;

        public b(DrawerLayout drawerLayout, MoreHelper moreHelper, Drawable drawable) {
            this.a = drawerLayout;
            this.b = moreHelper;
            this.c = drawable;
        }

        @Override
        public void a() {
            boolean z;
            DotTextView U0 = n.m.t.a.p.m.e1.a.U0(this.a);
            p pVar = p.a;
            if (p.a()) {
                ChatConfig chatConfig = ChatConfig.f15135n;
                if (chatConfig.q() > 0 || !chatConfig.s()) {
                    z = true;
                    U0.setHasDot(z);
                    MoreHelper moreHelper = this.b;
                    DrawerLayout drawerLayout = this.a;
                    Drawable drawable = this.c;
                    h.d(drawable, "navDotDrawable");
                    moreHelper.g(drawerLayout, drawable);
                }
            }
            z = false;
            U0.setHasDot(z);
            MoreHelper moreHelper2 = this.b;
            DrawerLayout drawerLayout2 = this.a;
            Drawable drawable2 = this.c;
            h.d(drawable2, "navDotDrawable");
            moreHelper2.g(drawerLayout2, drawable2);
        }
    }

    @Metadata(d1 = {"\u0000\u0013\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0005*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H\u0016J\b\u0010\u0004\u001a\u00020\u0003H\u0016J\b\u0010\u0005\u001a\u00020\u0003H\u0016J\b\u0010\u0006\u001a\u00020\u0003H\u0016J\b\u0010\u0007\u001a\u00020\u0003H\u0016¨\u0006\b"}, d2 = {"org/godfootsteps/more/MoreHelper$1$8", "Lorg/godfootsteps/router/MoreService$UserListener;", "onAnonymousRegistered", "", "onInsiderChanged", "onLogin", "onLogout", "onProfileChanged", "more_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
    public static final class c implements d.b {
        public final DrawerLayout b;
        public final n.i.a.a<e> c;
        public final n.i.a.a<e> f15992d;

        public c(DrawerLayout drawerLayout, n.i.a.a<e> aVar, n.i.a.a<e> aVar2) {
            this.b = drawerLayout;
            this.c = aVar;
            this.f15992d = aVar2;
        }

        @Override
        public void a() {
            MoreHelper.this.f(this.b);
        }

        @Override
        public void b() {
            n.i.a.a<e> aVar;
            MoreHelper.this.f(this.b);
            g.f6802n.w(false);
            if (NetworkUtils.c()) {
                d.c.a.m.a.v0();
            }
            List<Activity> b = m0.b();
            h.d(b, "getActivityList()");
            boolean z = false;
            boolean z2 = false;
            for (Activity activity : b) {
                if (activity instanceof PrivacyActivity) {
                    z = true;
                }
                if (activity instanceof SettingsActivity) {
                    z2 = true;
                }
            }
            if (!(m0.c() instanceof PrivacyActivity) && (!z || !z2)) {
                UserRepository userRepository = UserRepository.a;
                if (!userRepository.a()) {
                    WeakReference<Activity> weakReference = MainLoginActivity.f16054m;
                    Activity activity2 = weakReference == null ? null : weakReference.get();
                    if (!(activity2 != null)) {
                        activity2 = null;
                    }
                    if (activity2 == null) {
                        activity2 = m0.c();
                    }
                    final n.i.a.a<e> aVar2 = this.c;
                    d.c.a.m.a.p0(activity2, new DialogInterface.OnClickListener() {
                        @Override
                        public final void onClick(DialogInterface dialogInterface, int i2) {
                            n.i.a.a aVar3 = n.i.a.a.this;
                            UserRepository.a.b(true);
                            if (aVar3 == null) {
                                return;
                            }
                            aVar3.invoke();
                        }
                    }, null);
                } else if (userRepository.a() && (aVar = this.c) != null) {
                    aVar.invoke();
                }
            } else {
                UserRepository.a.b(true);
                n.i.a.a<e> aVar3 = this.c;
                if (aVar3 != null) {
                    aVar3.invoke();
                }
            }
            MainLoginActivity.f16054m = null;
        }

        @Override
        public void c() {
            g.f6802n.w(false);
            if (NetworkUtils.c()) {
                d.c.a.m.a.v0();
            }
        }

        @Override
        public void d() {
            n.i.a.a<e> aVar = this.f15992d;
            if (aVar == null) {
                return;
            }
            aVar.invoke();
        }

        @Override
        public void e() {
            MoreHelper.this.f(this.b);
        }
    }

    public MoreHelper(final DrawerLayout drawerLayout, n.i.a.a<e> aVar, n.i.a.a<e> aVar2) {
        final Drawable e2;
        MainViewModel Z;
        MutableLiveData<Boolean> mutableLiveData;
        MainViewModel Z2;
        h.e(drawerLayout, "drawerLayout");
        this.f15988i = drawerLayout;
        n.m.t.a.p.m.e1.a.J0(drawerLayout).setImageResource(R$drawable.ic_avatar);
        final Activity b2 = v.b();
        b2 = b2 == null ? m0.c() : b2;
        h.d(b2, "activity");
        AppUpdater appUpdater = new AppUpdater(b2);
        appUpdater.f15189n = new a(b2, appUpdater);
        this.f15989j = appUpdater;
        BaseMainActivity b3 = v.b();
        MutableLiveData<Boolean> mutableLiveData2 = null;
        if (b3 != null && (Z2 = b3.Z()) != null) {
            mutableLiveData2 = Z2.c;
        }
        if (mutableLiveData2 != null) {
            AppUpdater.a aVar3 = appUpdater.f15190o;
            mutableLiveData2.l(Boolean.valueOf(aVar3.f15199u.a(aVar3, AppUpdater.a.f15191v[7])));
        }
        if (!n.m.t.a.p.m.e1.a.q1(b2.getIntent()) || !n.m.t.a.p.m.e1.a.p1(b2.getIntent())) {
            final k kVar = new k();
            h.e(b2, "activity");
            r.a aVar4 = kVar.f6893o;
            n.m.k<?>[] kVarArr = k.f6891s;
            if (!aVar4.a(kVar, kVarArr[0])) {
                long a2 = kVar.f6894p.a(kVar, kVarArr[1]);
                int i2 = c0.a;
                Calendar calendar = Calendar.getInstance();
                calendar.set(11, 0);
                calendar.set(13, 0);
                calendar.set(12, 0);
                calendar.set(14, 0);
                long timeInMillis = calendar.getTimeInMillis();
                if (!(a2 >= timeInMillis && a2 < timeInMillis + 86400000)) {
                    kVar.f6895q.b(kVar, kVarArr[2], kVar.f6895q.a(kVar, kVarArr[2]) + 1);
                }
                kVar.f6894p.b(kVar, kVarArr[1], System.currentTimeMillis());
                UserContext userContext = UserContext.a;
                if (UserContext.l() || kVar.f6895q.a(kVar, kVarArr[2]) >= kVar.f6892n) {
                    AlertDialogBuilder alertDialogBuilder = new AlertDialogBuilder(b2, 0, 2);
                    alertDialogBuilder.r(R$string.about_app_rate_title);
                    alertDialogBuilder.o(R$string.about_app_rate_score, new DialogInterface.OnClickListener() {
                        @Override
                        public final void onClick(DialogInterface dialogInterface, int i3) {
                            k kVar2 = k.this;
                            Activity activity = b2;
                            n.i.b.h.e(kVar2, "this$0");
                            n.i.b.h.e(activity, "$activity");
                            kVar2.o(activity);
                            GAEventSendUtil.a.v("评分");
                        }
                    });
                    alertDialogBuilder.n(R$string.app_cancel, new DialogInterface.OnClickListener() {
                        @Override
                        public final void onClick(DialogInterface dialogInterface, int i3) {
                            k kVar2 = k.this;
                            n.i.b.h.e(kVar2, "this$0");
                            kVar2.p(true);
                            GAEventSendUtil.a.v("取消");
                        }
                    });
                    alertDialogBuilder.l(R$string.about_app_rate_feedback, new DialogInterface.OnClickListener() {
                        @Override
                        public final void onClick(DialogInterface dialogInterface, int i3) {
                            k kVar2 = k.this;
                            n.i.b.h.e(kVar2, "this$0");
                            kVar2.p(true);
                            e.c0.a.k0(FeedbackActivity.class);
                            GAEventSendUtil.a.v("发送反馈");
                        }
                    });
                    AlertDialog a3 = alertDialogBuilder.a();
                    kVar.f6896r = a3;
                    h.c(a3);
                    a3.show();
                }
            }
        }
        if (b2 instanceof j) {
            j jVar = (j) b2;
            jVar.getLifecycle().a(this);
            final Toolbar toolbar = (Toolbar) drawerLayout.findViewById(R$id.toolbar);
            int i3 = R$drawable.ic_nav;
            Context c2 = w.c();
            if (i3 != com.blankj.utilcode.R$attr.selectableItemBackground && i3 != com.blankj.utilcode.R$attr.actionBarItemBackground) {
                e2 = ComponentActivity.c.L(c2, i3);
                Objects.requireNonNull(e2, "null cannot be cast to non-null type android.graphics.drawable.Drawable");
            } else {
                e2 = w.e(c2, i3);
            }
            toolbar.setNavigationIcon(e2);
            Drawable navigationIcon = toolbar.getNavigationIcon();
            Objects.requireNonNull(navigationIcon, "null cannot be cast to non-null type android.graphics.drawable.LayerDrawable");
            final Drawable findDrawableByLayerId = ((LayerDrawable) navigationIcon).findDrawableByLayerId(R$id.dot);
            Drawable navigationIcon2 = toolbar.getNavigationIcon();
            Objects.requireNonNull(navigationIcon2, "null cannot be cast to non-null type android.graphics.drawable.LayerDrawable");
            final Drawable findDrawableByLayerId2 = ((LayerDrawable) navigationIcon2).findDrawableByLayerId(R$id.nav);
            NightModelManager nightModelManager = NightModelManager.a;
            NightModelManager.b(jVar, new l<Boolean, e>() {
                {
                    super(1);
                }

                @Override
                public e invoke(Boolean bool) {
                    invoke(bool.booleanValue());
                    return e.a;
                }

                public final void invoke(boolean z) {
                    Toolbar.this.setNavigationIcon(e2);
                    findDrawableByLayerId2.setColorFilter(a.b(w.c(), R$color.text1), PorterDuff.Mode.SRC_IN);
                }
            });
            try {
                UserRepository userRepository = UserRepository.a;
                ((LiveData) UserRepository.f16023d.getValue()).f((j) b2, new m() {
                    @Override
                    public final void a(Object obj) {
                        UserStatus userStatus = (UserStatus) obj;
                        UserMessageRepository userMessageRepository = UserMessageRepository.a;
                        UserMessageRepository.d();
                    }
                });
                UserMessageRepository userMessageRepository = UserMessageRepository.a;
                UserMessageRepository.b(new m() {
                    @Override
                    public final void a(Object obj) {
                        DrawerLayout drawerLayout2 = DrawerLayout.this;
                        MoreHelper moreHelper = this;
                        Drawable drawable = findDrawableByLayerId;
                        Boolean bool = (Boolean) obj;
                        n.i.b.h.e(drawerLayout2, "$this_apply");
                        n.i.b.h.e(moreHelper, "this$0");
                        n.i.b.h.e(drawerLayout2, "<this>");
                        n.i.b.h.d(bool, "it");
                        ((DotTextView) drawerLayout2.findViewById(R$id.tv_more_message)).setHasDot(bool.booleanValue());
                        n.i.b.h.d(drawable, "navDotDrawable");
                        moreHelper.g(drawerLayout2, drawable);
                    }
                });
                BaseMainActivity b4 = v.b();
                if (b4 != null && (Z = b4.Z()) != null && (mutableLiveData = Z.c) != null) {
                    mutableLiveData.f((j) b2, new m() {
                        @Override
                        public final void a(Object obj) {
                            DrawerLayout drawerLayout2 = DrawerLayout.this;
                            MoreHelper moreHelper = this;
                            Drawable drawable = findDrawableByLayerId;
                            Boolean bool = (Boolean) obj;
                            n.i.b.h.e(drawerLayout2, "$this_apply");
                            n.i.b.h.e(moreHelper, "this$0");
                            DotTextView T0 = n.m.t.a.p.m.e1.a.T0(drawerLayout2);
                            n.i.b.h.d(bool, "it");
                            T0.setHasDot(bool.booleanValue());
                            n.i.b.h.d(drawable, "navDotDrawable");
                            moreHelper.g(drawerLayout2, drawable);
                        }
                    });
                }
                ChatConfig.f15135n.t((j) b2, new b(drawerLayout, this, findDrawableByLayerId));
                p pVar = p.a;
                p.b.f((j) b2, new m() {
                    @Override
                    public final void a(Object obj) {
                        boolean z;
                        DrawerLayout drawerLayout2 = DrawerLayout.this;
                        MoreHelper moreHelper = this;
                        Drawable drawable = findDrawableByLayerId;
                        ChatModel chatModel = (ChatModel) obj;
                        n.i.b.h.e(drawerLayout2, "$this_apply");
                        n.i.b.h.e(moreHelper, "this$0");
                        DotTextView U0 = n.m.t.a.p.m.e1.a.U0(drawerLayout2);
                        d.a.b.p pVar2 = d.a.b.p.a;
                        if (d.a.b.p.a()) {
                            ChatConfig chatConfig = ChatConfig.f15135n;
                            if (chatConfig.q() > 0 || !chatConfig.s()) {
                                z = true;
                                U0.setHasDot(z);
                                n.i.b.h.d(drawable, "navDotDrawable");
                                moreHelper.g(drawerLayout2, drawable);
                                if (!n.i.b.h.a(chatModel.getHome().getPlatform(), "chat")) {
                                    n.i.b.h.e(drawerLayout2, "<this>");
                                    ((CustomThumbnailView) drawerLayout2.findViewById(R$id.iv_more_chat)).c(R$drawable.ic_live_chat);
                                    DotTextView U02 = n.m.t.a.p.m.e1.a.U0(drawerLayout2);
                                    String string = i.c.a.c.w.c().getString(org.godfootsteps.more.R$string.drawer_live_chat);
                                    n.i.b.h.d(string, "activityOrAppContext.getString(resId)");
                                    U02.setText(string);
                                    return;
                                }
                                n.m.t.a.p.m.e1.a.U0(drawerLayout2).setText(chatModel.getHome().getDescription());
                                n.i.b.h.e(drawerLayout2, "<this>");
                                CustomThumbnailView customThumbnailView = (CustomThumbnailView) drawerLayout2.findViewById(R$id.iv_more_chat);
                                n.i.b.h.d(customThumbnailView, "iv_more_chat_ext");
                                customThumbnailView.e(chatModel.getHome().getIcon(), R$drawable.ic_placeholder_float_chat_btn_white, (r14 & 4) != 0 ? -1 : 0, (r14 & 8) != 0 ? -1 : 0, (r14 & 16) != 0 ? false : false);
                                return;
                            }
                        }
                        z = false;
                        U0.setHasDot(z);
                        n.i.b.h.d(drawable, "navDotDrawable");
                        moreHelper.g(drawerLayout2, drawable);
                        if (!n.i.b.h.a(chatModel.getHome().getPlatform(), "chat")) {
                        }
                    }
                });
            } catch (Exception e3) {
                e3.printStackTrace();
            }
            UserHelper userHelper = UserHelper.f16078d;
            UserHelper.e(jVar, new c(drawerLayout, aVar, aVar2));
        }
        f(drawerLayout);
        h.e(drawerLayout, "<this>");
        ((TextView) drawerLayout.findViewById(org.godfootsteps.arch.R$id.btn_login)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_apply");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(MainLoginActivity.class);
                    }
                });
            }
        });
        h.e(drawerLayout, "<this>");
        ((LinearLayout) drawerLayout.findViewById(org.godfootsteps.arch.R$id.ll_more_message)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(UserMessageActivity.class);
                        GAEventSendUtil.a.k("侧边栏我的消息", null);
                    }
                });
            }
        });
        h.e(drawerLayout, "<this>");
        ((LinearLayout) drawerLayout.findViewById(org.godfootsteps.arch.R$id.ll_more_chat)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        ChatBean home;
                        String platform;
                        ChatBean home2;
                        ChatBean home3;
                        UserContext userContext2 = UserContext.a;
                        if (UserContext.i()) {
                            return;
                        }
                        p pVar2 = p.a;
                        if (p.a()) {
                            e.c0.a.k0(ChatActivity.class);
                            GAEventSendUtil.a.q("侧边栏", "chat");
                            return;
                        }
                        ChatModel d2 = p.b.d();
                        String str = "";
                        String str2 = (d2 == null || (home3 = d2.getHome()) == null || (str2 = home3.getUrl()) == null) ? "" : "";
                        ChatModel d3 = p.b.d();
                        d.c.g.l3.l.d(str2, (d3 == null || (home2 = d3.getHome()) == null || (r3 = home2.getPlatform()) == null) ? "" : "", null);
                        GAEventSendUtil.Companion companion = GAEventSendUtil.a;
                        ChatModel d4 = p.b.d();
                        if (d4 != null && (home = d4.getHome()) != null && (platform = home.getPlatform()) != null) {
                            str = platform;
                        }
                        companion.q("侧边栏", str);
                    }
                });
            }
        });
        h.e(drawerLayout, "<this>");
        ((LinearLayout) drawerLayout.findViewById(org.godfootsteps.arch.R$id.ll_more_contact_us)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(ContactUsActivity.class);
                        GAEventSendUtil.a.k("侧边栏联系我们", null);
                    }
                });
            }
        });
        h.e(drawerLayout, "<this>");
        ((AppCompatTextView) drawerLayout.findViewById(org.godfootsteps.arch.R$id.tv_more_language)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(LanguageActivity.class);
                    }
                });
            }
        });
        h.e(drawerLayout, "<this>");
        ((AppCompatTextView) drawerLayout.findViewById(org.godfootsteps.arch.R$id.tv_more_settings)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(SettingsActivity.class);
                    }
                });
            }
        });
        h.e(drawerLayout, "<this>");
        ((AppCompatTextView) drawerLayout.findViewById(org.godfootsteps.arch.R$id.tv_more_feedback)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(FeedbackActivity.class);
                        GAEventSendUtil.a.k("侧边栏意见反馈", null);
                    }
                });
            }
        });
        h.e(drawerLayout, "<this>");
        ((AppCompatTextView) drawerLayout.findViewById(org.godfootsteps.arch.R$id.tv_more_about_us)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(AboutUsActivity.class);
                        GAEventSendUtil.a.k("侧边栏关于我们", null);
                    }
                });
            }
        });
        n.m.t.a.p.m.e1.a.T0(drawerLayout).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(AboutAppActivity.class);
                    }
                });
            }
        });
        h.e(drawerLayout, "<this>");
        ((AppCompatTextView) drawerLayout.findViewById(org.godfootsteps.arch.R$id.tv_more_share_app)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                final MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    {
                        super(0);
                    }

                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        MoreHelper.this.f15990k = n.m.t.a.p.m.e1.a.u2(new n.i.a.a<String>() {
                            @Override
                            public final String invoke() {
                                Context c3 = w.c();
                                String string = w.c().getString(R$string.app_share_app_content);
                                h.d(string, "activityOrAppContext.getString(resId)");
                                return h.j(e.c0.a.I(c3, string), "\nhttps://www.kingdomsalvation.org/cagapp.php");
                            }
                        });
                        GAEventSendUtil.a.k("侧边栏分享app", null);
                    }
                });
            }
        });
        h.e(drawerLayout, "<this>");
        int i4 = org.godfootsteps.arch.R$id.tv_using_help;
        ((AppCompatTextView) drawerLayout.findViewById(i4)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MoreHelper moreHelper = MoreHelper.this;
                DrawerLayout drawerLayout2 = drawerLayout;
                n.i.b.h.e(moreHelper, "this$0");
                n.i.b.h.e(drawerLayout2, "$this_initClick");
                moreHelper.c(drawerLayout2, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(UseHelpActivity.class);
                    }
                });
            }
        });
        RecyclerView P0 = n.m.t.a.p.m.e1.a.P0(drawerLayout);
        AtomicInteger atomicInteger = a0.a;
        a0.i.t(P0, false);
        if (s.l()) {
            return;
        }
        h.e(drawerLayout, "<this>");
        AppCompatTextView appCompatTextView = (AppCompatTextView) drawerLayout.findViewById(i4);
        h.d(appCompatTextView, "tv_more_using_help");
        n0.c(appCompatTextView, false, 1);
    }

    public final void c(final DrawerLayout drawerLayout, final n.i.a.a<e> aVar) {
        drawerLayout.addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
            @Override
            public void b(View view) {
                h.e(view, "drawerView");
                DrawerLayout.this.removeDrawerListener(this);
                aVar.invoke();
            }
        });
        drawerLayout.closeDrawer(8388611);
    }

    @n(Lifecycle.Event.ON_DESTROY)
    public final void destroy() {
        this.f15989j.f15189n = null;
        this.f15990k = null;
    }

    public final void f(View view) {
        h.e(view, "<this>");
        UserContext userContext = UserContext.a;
        String str = null;
        if (!UserContext.m()) {
            if ((UserContext.c.getAccountType() == -1) || UserContext.d() != -1) {
                if (n.m.t.a.p.m.e1.a.X0(view).getDisplayedChild() == 1) {
                    n.m.t.a.p.m.e1.a.X0(view).setDisplayedChild(0);
                    ImageView I0 = n.m.t.a.p.m.e1.a.I0(view);
                    h.d(I0, "iv_avatar_edit_ext");
                    n0.b(I0, false);
                    n.m.t.a.p.m.e1.a.J0(view).setOnClickListener(null);
                    n.m.t.a.p.m.e1.a.J0(view).setImageResource(R$drawable.ic_avatar);
                    return;
                }
                return;
            }
        }
        String avatar = UserContext.c.getAvatar();
        h.d(avatar, "user.avatar");
        if (!(avatar.length() == 0)) {
            Objects.requireNonNull(AppClient.a);
            if (!h.a(avatar, "https://appservercn.kingdomsalvation.org")) {
                carbon.widget.ImageView J0 = n.m.t.a.p.m.e1.a.J0(view);
                h.d(J0, "iv_avatar_ext");
                n.m.t.a.p.m.e1.a.D1(J0, avatar, Integer.valueOf(R$drawable.ic_avatar));
                n.m.t.a.p.m.e1.a.X0(view).setDisplayedChild(1);
                ImageView I02 = n.m.t.a.p.m.e1.a.I0(view);
                h.d(I02, "iv_avatar_edit_ext");
                n0.t(I02);
                n.m.t.a.p.m.e1.a.J0(view).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public final void onClick(View view2) {
                        MoreHelper moreHelper = MoreHelper.this;
                        n.i.b.h.e(moreHelper, "this$0");
                        moreHelper.c(moreHelper.f15988i, new n.i.a.a<n.e>() {
                            @Override
                            public e invoke() {
                                invoke2();
                                return e.a;
                            }

                            public final void invoke2() {
                                e.c0.a.k0(UserProfileActivity.class);
                            }
                        });
                    }
                });
                n.m.t.a.p.m.e1.a.I0(view).setOnClickListener(new View.OnClickListener() {
                    @Override
                    public final void onClick(View view2) {
                        MoreHelper moreHelper = MoreHelper.this;
                        n.i.b.h.e(moreHelper, "this$0");
                        moreHelper.c(moreHelper.f15988i, new n.i.a.a<n.e>() {
                            @Override
                            public e invoke() {
                                invoke2();
                                return e.a;
                            }

                            public final void invoke2() {
                                e.c0.a.k0(UserProfileActivity.class);
                            }
                        });
                    }
                });
                if (UserContext.b().length() != 0) {
                    if (UserContext.c().length() == 0) {
                        try {
                            str = (String) n.o.a.A(UserContext.f(), new String[]{"@"}, false, 0, 6).get(0);
                        } catch (Exception unused) {
                        }
                        h.e(view, "<this>");
                        ((android.widget.TextView) view.findViewById(org.godfootsteps.arch.R$id.tv_name)).setText(str);
                    }
                }
                if (!s.n()) {
                    str = UserContext.c() + ' ' + UserContext.b();
                } else {
                    str = UserContext.b() + ' ' + UserContext.c();
                }
                h.e(view, "<this>");
                ((android.widget.TextView) view.findViewById(org.godfootsteps.arch.R$id.tv_name)).setText(str);
            }
        }
        n.m.t.a.p.m.e1.a.J0(view).setImageResource(R$drawable.ic_avatar);
        n.m.t.a.p.m.e1.a.X0(view).setDisplayedChild(1);
        ImageView I022 = n.m.t.a.p.m.e1.a.I0(view);
        h.d(I022, "iv_avatar_edit_ext");
        n0.t(I022);
        n.m.t.a.p.m.e1.a.J0(view).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view2) {
                MoreHelper moreHelper = MoreHelper.this;
                n.i.b.h.e(moreHelper, "this$0");
                moreHelper.c(moreHelper.f15988i, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(UserProfileActivity.class);
                    }
                });
            }
        });
        n.m.t.a.p.m.e1.a.I0(view).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view2) {
                MoreHelper moreHelper = MoreHelper.this;
                n.i.b.h.e(moreHelper, "this$0");
                moreHelper.c(moreHelper.f15988i, new n.i.a.a<n.e>() {
                    @Override
                    public e invoke() {
                        invoke2();
                        return e.a;
                    }

                    public final void invoke2() {
                        e.c0.a.k0(UserProfileActivity.class);
                    }
                });
            }
        });
        if (UserContext.b().length() != 0) {
        }
        if (!s.n()) {
        }
        h.e(view, "<this>");
        ((android.widget.TextView) view.findViewById(org.godfootsteps.arch.R$id.tv_name)).setText(str);
    }

    public final void g(DrawerLayout drawerLayout, Drawable drawable) {
        h.e(drawerLayout, "<this>");
        boolean z = ((DotTextView) drawerLayout.findViewById(org.godfootsteps.arch.R$id.tv_more_message)).f15285q || n.m.t.a.p.m.e1.a.U0(drawerLayout).f15285q || n.m.t.a.p.m.e1.a.T0(drawerLayout).f15285q;
        r0.intValue();
        r0 = z ? 255 : null;
        drawable.setAlpha(r0 != null ? r0.intValue() : 0);
    }

    @n(Lifecycle.Event.ON_RESUME)
    public final void resume() {
    }
}