红果免费短剧 v6.2.3.32版本的 MD5 值为:a6b05492607eab2c8a25f26d2f238ae0

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


package com.dragon.read.component.biz.impl.mine.feedback;

import android.content.Intent;
import android.util.Log;
import com.dragon.read.app.App;
import com.dragon.read.app.AppProperty;
import com.dragon.read.base.http.c;
import com.dragon.read.base.util.LogWrapper;
import com.dragon.read.component.biz.impl.mine.feedback.api.IFeedbackApi;
import com.dragon.read.util.DebugManager;
import io.reactivex.Single;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;

public class a {

    private static final a f59139b = new a();

    public boolean f59140a;

    private a() {
    }

    public static a a() {
        return f59139b;
    }

    public Single<Boolean> b() {
        String str;
        IFeedbackApi iFeedbackApi = (IFeedbackApi) c.a(AppProperty.getBaseUrl(), IFeedbackApi.class);
        if (DebugManager.inst().isBOEMode()) {
            str = "https://boe.i.snssdk.com/api/feedback/v1/newest_reply/";
        } else {
            str = "https://feedback-c.zijieapi.com/api/feedback/v1/newest_reply/";
        }
        return iFeedbackApi.getNewestReplyModel(str, "novelapp_android").map(new Function<com.dragon.read.component.biz.impl.mine.feedback.a.a, Boolean>() {
            @Override
            public Boolean apply(com.dragon.read.component.biz.impl.mine.feedback.a.a aVar) throws Exception {
                if (aVar != null && aVar.f59145b == 0 && aVar.f59146c != null) {
                    a.this.f59140a = aVar.f59146c.f59148b;
                    return Boolean.valueOf(aVar.f59146c.f59148b);
                }
                return false;
            }
        });
    }

    public void c() {
        b().subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer<Boolean>() {
            @Override
            public void accept(Boolean bool) throws Exception {
                if (bool != null) {
                    Intent intent = new Intent("action_feedback_red_dot");
                    intent.putExtra("key_show_red_dot", bool.booleanValue());
                    App.sendLocalBroadcast(intent);
                    LogWrapper.info("FeedbackMgr", "show feedback red dot success", new Object[0]);
                    return;
                }
                LogWrapper.info("FeedbackMgr", "show feedback red dot fail, Boolean object is null", new Object[0]);
            }
        }, new Consumer<Throwable>() {
            @Override
            public void accept(Throwable th) throws Exception {
                LogWrapper.error("FeedbackMgr", Log.getStackTraceString(th), new Object[0]);
            }
        });
    }
}