删除老的用户等级主播等级的图标
This commit is contained in:
@@ -12,7 +12,6 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.bean.FansMedalBean;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.UserItemBean;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
@@ -29,7 +28,6 @@ import java.util.Map;
|
||||
/**
|
||||
* Created by cxf on 2017/8/4.
|
||||
*/
|
||||
|
||||
public class CommonAppConfig {
|
||||
//域名
|
||||
public static final String HOST = getMetaDataString("SERVER_HOST");
|
||||
@@ -109,7 +107,6 @@ public class CommonAppConfig {
|
||||
private boolean mLaunched;//App是否启动了
|
||||
private String mJPushAppKey;//极光推送的AppKey
|
||||
private List<UserItemBean> mUserItemList;//个人中心功能列表
|
||||
private SparseArray<LevelBean> mLevelMap;
|
||||
private SparseArray<FansMedalBean> mAnchorFansMedalMap;
|
||||
private String mGiftListJson;
|
||||
private String mWrapListJson;
|
||||
@@ -520,27 +517,6 @@ public class CommonAppConfig {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存用户等级信息
|
||||
*/
|
||||
public void setLevel(String levelJson) {
|
||||
if (TextUtils.isEmpty(levelJson)) {
|
||||
return;
|
||||
}
|
||||
List<LevelBean> list = JSON.parseArray(levelJson, LevelBean.class);
|
||||
if (list == null || list.size() == 0) {
|
||||
return;
|
||||
}
|
||||
if (mLevelMap == null) {
|
||||
mLevelMap = new SparseArray<>();
|
||||
}
|
||||
mLevelMap.clear();
|
||||
for (LevelBean bean : list) {
|
||||
mLevelMap.put(bean.getLevel(), bean);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存主播粉丝徽章信息
|
||||
*/
|
||||
@@ -579,24 +555,6 @@ public class CommonAppConfig {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户等级
|
||||
*/
|
||||
public LevelBean getLevel(int level) {
|
||||
if (mLevelMap == null) {
|
||||
String configString = SpUtil.getInstance().getStringValue(SpUtil.CONFIG);
|
||||
if (!TextUtils.isEmpty(configString)) {
|
||||
JSONObject obj = JSON.parseObject(configString);
|
||||
setLevel(obj.getString("level"));
|
||||
}
|
||||
}
|
||||
if (mLevelMap == null || mLevelMap.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return mLevelMap.get(level);
|
||||
}
|
||||
|
||||
|
||||
public String getGiftListJson() {
|
||||
return mGiftListJson;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user