产品优化汇总

This commit is contained in:
kehaoyuan
2017-05-03 16:09:14 +08:00
parent b5328324f8
commit dec6bd6779
71 changed files with 879 additions and 376 deletions

View File

@ -1,31 +1,67 @@
package com.gh.gamecenter.adapter;
import android.content.*;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.text.Html;
import android.view.*;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.gh.common.constant.Config;
import com.gh.common.util.*;
import com.gh.gamecenter.*;
import com.gh.gamecenter.adapter.viewholder.*;
import com.gh.common.util.CommentUtils;
import com.gh.common.util.ConcernContentUtils;
import com.gh.common.util.DataCollectionUtils;
import com.gh.common.util.DataUtils;
import com.gh.common.util.DisplayUtils;
import com.gh.common.util.ImageUtils;
import com.gh.common.util.NewsUtils;
import com.gh.common.util.PostCommentUtils;
import com.gh.common.util.StringUtils;
import com.gh.common.util.TimestampUtils;
import com.gh.common.util.Utils;
import com.gh.gamecenter.MessageDetailActivity;
import com.gh.gamecenter.NewsDetailActivity;
import com.gh.gamecenter.R;
import com.gh.gamecenter.ShareCardActivity;
import com.gh.gamecenter.ShareCardPicActivity;
import com.gh.gamecenter.WebActivity;
import com.gh.gamecenter.adapter.viewholder.CommentHeadViewHolder;
import com.gh.gamecenter.adapter.viewholder.CommentViewHolder;
import com.gh.gamecenter.adapter.viewholder.FooterViewHolder;
import com.gh.gamecenter.adapter.viewholder.NewsDigestViewHolder;
import com.gh.gamecenter.db.CommentDao;
import com.gh.gamecenter.db.VoteDao;
import com.gh.gamecenter.db.info.VoteInfo;
import com.gh.gamecenter.entity.CommentEntity;
import com.gh.gamecenter.entity.ConcernEntity;
import com.gh.gamecenter.manager.VisitManager;
import com.gh.gamecenter.retrofit.*;
import org.json.*;
import com.gh.gamecenter.retrofit.JSONObjectResponse;
import com.gh.gamecenter.retrofit.OkHttpCache;
import com.gh.gamecenter.retrofit.Response;
import com.gh.gamecenter.retrofit.RetrofitManager;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import retrofit2.adapter.rxjava.HttpException;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import java.util.*;
/**
* Created by khy on 2016/11/8.
* 消息详情-数据适配器
@ -504,11 +540,11 @@ public class MessageDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
//获取需要修改缓存的链接
String cacheUrl;
if (finalIsHotComment) {
cacheUrl = Config.COMMENT_HOST + "article/" + mConcernEntity.getId() +
"/comment?order=hot&limit=" + 10 + "&offset=" + 0; // 热门评论固定链接
cacheUrl = StringUtils.buildString(Config.COMMENT_HOST , "article/" , mConcernEntity.getId() ,
"/comment?order=hot&limit=10" , "&offset=0"); // 热门评论固定链接
} else {
cacheUrl = Config.COMMENT_HOST + "article/" + mConcernEntity.getId() +
"/comment?limit=" + 10 + "&offset=" + index;
cacheUrl = StringUtils.buildString(Config.COMMENT_HOST , "article/" , mConcernEntity.getId() ,
"/comment?limit=10&offset=" , String.valueOf(index));
}
modifyVolleyCache(finalCommentEntity.getId(), cacheUrl); //修改缓存