修復:舉報頁面獲取權限問題

This commit is contained in:
Martin 2024-09-11 14:23:17 +08:00
parent 02ee96e369
commit d299e579d6
2 changed files with 8 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import com.yunbao.common.http.LiveHttpConsts;
import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.LiveHttpUtil;
import java.io.File; import java.io.File;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -80,12 +81,13 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
mRecyclerView.setHasFixedSize(true); mRecyclerView.setHasFixedSize(true);
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false)); mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
mKeyBoardHeightUtil = new KeyBoardHeightUtil(mContext, findViewById(android.R.id.content), this); mKeyBoardHeightUtil = new KeyBoardHeightUtil(mContext, findViewById(android.R.id.content), this);
mAdapter = new LiveReportAdapter(mContext, new ArrayList<>());
LiveHttpUtil.getLiveReportList(new HttpCallback() { LiveHttpUtil.getLiveReportList(new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if (code == 0) { if (code == 0) {
List<LiveReportBean> list = JSON.parseArray(Arrays.toString(info), LiveReportBean.class); List<LiveReportBean> list = JSON.parseArray(Arrays.toString(info), LiveReportBean.class);
mAdapter = new LiveReportAdapter(mContext, list); mAdapter.initData(list);
mAdapter.setActionListener(LiveReportActivity.this); mAdapter.setActionListener(LiveReportActivity.this);
if (mRecyclerView != null) { if (mRecyclerView != null) {
mRecyclerView.setAdapter(mAdapter); mRecyclerView.setAdapter(mAdapter);

View File

@ -148,6 +148,11 @@ public class LiveReportAdapter extends RecyclerView.Adapter {
}); });
} }
public void initData(List<LiveReportBean> list){
mList = list;
notifyDataSetChanged();
}
@Override @Override
public int getItemViewType(int position) { public int getItemViewType(int position) {