fix: 【光环助手V5.13.0】评论 新增 IP属地展示(0822测试3,4) https://git.shanqu.cc/pm/halo/halo-app-issues/-/issues/2008

This commit is contained in:
张玉久
2022-08-22 16:44:46 +08:00
parent 15565281a9
commit 4fef613390
3 changed files with 28 additions and 21 deletions

View File

@ -21,33 +21,32 @@ import androidx.recyclerview.widget.RecyclerView;
import com.gh.common.constant.Config;
import com.gh.common.util.CheckLoginUtils;
import com.gh.common.util.DialogUtils;
import com.gh.gamecenter.common.callback.ConfirmListener;
import com.gh.gamecenter.core.utils.DisplayUtils;
import com.gh.gamecenter.common.constant.EntranceConsts;
import com.gh.common.util.ErrorHelper;
import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.gamecenter.core.utils.KeyboardHeightObserver;
import com.gh.gamecenter.core.utils.KeyboardHeightProvider;
import com.gh.common.util.PostCommentUtils;
import com.gh.gamecenter.common.utils.TextHelper;
import com.gh.gamecenter.common.utils.TimestampUtils;
import com.gh.gamecenter.core.utils.UrlFilterUtils;
import com.gh.gamecenter.MessageDetailActivity;
import com.gh.gamecenter.R;
import com.gh.gamecenter.adapter.MessageDetailAdapter;
import com.gh.gamecenter.adapter.OnCommentCallBackListener;
import com.gh.gamecenter.common.base.fragment.ToolbarFragment;
import com.gh.gamecenter.common.constant.EntranceConsts;
import com.gh.gamecenter.common.eventbus.EBReuse;
import com.gh.gamecenter.common.retrofit.OkHttpCache;
import com.gh.gamecenter.common.retrofit.Response;
import com.gh.gamecenter.common.utils.TextHelper;
import com.gh.gamecenter.common.utils.TimestampUtils;
import com.gh.gamecenter.core.utils.DisplayUtils;
import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.gamecenter.core.utils.KeyboardHeightObserver;
import com.gh.gamecenter.core.utils.KeyboardHeightProvider;
import com.gh.gamecenter.core.utils.UrlFilterUtils;
import com.gh.gamecenter.databinding.FragmentMessageDetailBinding;
import com.gh.gamecenter.entity.CommentEntity;
import com.gh.gamecenter.entity.CommentnumEntity;
import com.gh.gamecenter.entity.ConcernEntity;
import com.gh.gamecenter.login.entity.UserInfoEntity;
import com.gh.gamecenter.entity.ViewsEntity;
import com.gh.gamecenter.common.eventbus.EBReuse;
import com.gh.gamecenter.manager.CommentManager;
import com.gh.gamecenter.login.entity.UserInfoEntity;
import com.gh.gamecenter.login.user.UserManager;
import com.gh.gamecenter.common.base.fragment.ToolbarFragment;
import com.gh.gamecenter.common.retrofit.OkHttpCache;
import com.gh.gamecenter.common.retrofit.Response;
import com.gh.gamecenter.manager.CommentManager;
import com.gh.gamecenter.retrofit.RetrofitManager;
import com.halo.assistant.HaloApp;
import com.lightgame.listeners.OnBackPressedListener;
@ -363,10 +362,7 @@ public class MessageDetailFragment extends ToolbarFragment implements OnCommentC
cacheObject.put("parent", cacheParent);
}
CommentEntity commentEntity = GsonUtils.fromJson(cacheObject.toString(), CommentEntity.class);
if (mConcernEntity != null) {
adapter.addNormalComment(commentEntity);
}
adapter.addNormalComment(true);
modifyNewsCommentOkhttpCache(adapter.findTheLastPriorComment(), cacheObject, newsId);
} catch (JSONException e) {