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

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