admin
2021-05-14 1b4b3fed2569ac21ad6feb0a3a2c051175e7c36e
app/src/main/java/com/tejia/lijin/app/ui/main/MessageFragment.java
@@ -27,6 +27,7 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.tejia.lijin.app.ShoppingApplication;
import com.wpc.library.content.ConnectivityChangeHelper;
import com.wpc.library.recyclerviewhelper.DividerItemDecoration;
import com.wpc.library.util.NetUtils;
@@ -217,8 +218,8 @@
        adapter = new MainMessageAdapter(rv_message.getContext(), mList, new IDeleteMessageListener() {
            @Override
            public void delete(final UserMessage msg) {
                if (LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) {
                    ShoppingApi.deleteMsg(getContext(), UserUtil.getUid(getContext()) + "", msg.getType(), msg.getId(), new BasicTextHttpResponseHandler() {
                if (LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true)) {
                    ShoppingApi.deleteMsg(getContext(), UserUtil.getUid(getContext()) , msg.getType(), msg.getId(), new BasicTextHttpResponseHandler() {
                        @Override
                        public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception {
                            super.onSuccessPerfect(statusCode, headers, jsonObject);
@@ -557,14 +558,14 @@
     * 获取消息未读数量
     */
    private void getUnReadMsgCount() {
        mPresenter.getUnReadMsgCount(mPresenter.getUID());
        mPresenter.getUnReadMsgCount(UserUtil.getUid(ShoppingApplication.application));
    }
    /**
     * 一键清空未读消息
     */
    private void setAllMsgRead() {
        mPresenter.setAllMsgRead(mPresenter.getUID());
        mPresenter.setAllMsgRead(UserUtil.getUid(ShoppingApplication.application));
    }
    @Override
@@ -572,7 +573,7 @@
        boolean isLogin = sp.getBoolean("isLogin", false);
        switch (v.getId()) {
            case R.id.fl_order_notice: {
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true))
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true))
                    return;
                if (!isLogin) {//判断登陆
@@ -589,7 +590,7 @@
                break;
            }
            case R.id.fl_capital_notice: {
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true))
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true))
                    return;
                if (!isLogin) {//判断登陆
                    isChoice = true;//代表点击
@@ -604,7 +605,7 @@
                break;
            }
            case R.id.fl_account_notice: {
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true))
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true))
                    return;
                if (!isLogin) {//判断登陆
                    isChoice = true;//代表点击
@@ -619,7 +620,7 @@
                break;
            }
            case R.id.fl_invite_notice: {
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true))
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true))
                    return;
                if (!isLogin) {//判断登陆
                    isChoice = true;//代表点击
@@ -634,7 +635,7 @@
                break;
            }
            case R.id.fl_other_msg: {
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true))
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true))
                    return;
                if (!isLogin) {//判断登陆
                    isChoice = true;//代表点击
@@ -649,7 +650,7 @@
                break;
            }
            case R.id.ll_critical_notice://系统消息
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true))
                if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true))
                    return;
                if (!isLogin) {//判断登陆
                    UserUtil.jumpLogin(fl_order_notice.getContext());
@@ -719,7 +720,7 @@
     * 消息中心红包
     */
    private void getMSGConfig() {
        mPresenter.getMSGConfig(mPresenter.getUID());
        mPresenter.getMSGConfig(UserUtil.getUid(ShoppingApplication.application));
    }
    /**