调整多人连麦踢人后刷新列表
This commit is contained in:
parent
3d117dbcb4
commit
d42835231e
@ -20,6 +20,7 @@ import com.yunbao.common.Constants;
|
|||||||
import com.yunbao.common.adapter.RefreshAdapter;
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
import com.yunbao.common.bean.LevelBean;
|
||||||
|
import com.yunbao.common.custom.CommonRefreshView;
|
||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.API;
|
import com.yunbao.common.http.API;
|
||||||
@ -52,6 +53,7 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
|||||||
public static final int TYPE_MIC_INVITE = 3;//邀请连麦
|
public static final int TYPE_MIC_INVITE = 3;//邀请连麦
|
||||||
|
|
||||||
private AbsDialogFragment fragments;
|
private AbsDialogFragment fragments;
|
||||||
|
private CommonRefreshView refreshView;
|
||||||
private String mLiveUid;
|
private String mLiveUid;
|
||||||
|
|
||||||
public AnchorUserMicInfoAdapter(Context context, AbsDialogFragment fragment) {
|
public AnchorUserMicInfoAdapter(Context context, AbsDialogFragment fragment) {
|
||||||
@ -62,10 +64,13 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemViewType(int position) {
|
public int getItemViewType(int position) {
|
||||||
|
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setRefreshView(CommonRefreshView refreshView) {
|
||||||
|
this.refreshView = refreshView;
|
||||||
|
}
|
||||||
|
|
||||||
public void setLiveUid(String mLiveUid) {
|
public void setLiveUid(String mLiveUid) {
|
||||||
this.mLiveUid = mLiveUid;
|
this.mLiveUid = mLiveUid;
|
||||||
}
|
}
|
||||||
@ -135,6 +140,7 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
SocketSendBean createSocketSendBean() {
|
SocketSendBean createSocketSendBean() {
|
||||||
return new SocketSendBean()
|
return new SocketSendBean()
|
||||||
.param("_method_", Constants.LIAN_MAI)
|
.param("_method_", Constants.LIAN_MAI)
|
||||||
@ -142,6 +148,7 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
|||||||
.param("avatar", CommonAppConfig.getInstance().getUserBean().getAvatar())
|
.param("avatar", CommonAppConfig.getInstance().getUserBean().getAvatar())
|
||||||
.param("uid", CommonAppConfig.getInstance().getUid());
|
.param("uid", CommonAppConfig.getInstance().getUid());
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyMic(MicUserBean bean, int action, SocketSendBean msg) {
|
void applyMic(MicUserBean bean, int action, SocketSendBean msg) {
|
||||||
msg.param("action", action);
|
msg.param("action", action);
|
||||||
msg.create();
|
msg.create();
|
||||||
@ -157,12 +164,14 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(io.rong.imlib.model.Message message) {
|
public void onSuccess(io.rong.imlib.model.Message message) {
|
||||||
Log.e("ry", "发送成功");
|
Log.e("ry", "发送成功");
|
||||||
|
refreshView.initData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(io.rong.imlib.model.Message message, RongIMClient.ErrorCode errorCode) {
|
public void onError(io.rong.imlib.model.Message message, RongIMClient.ErrorCode errorCode) {
|
||||||
Log.e("ry", "发送失敗" + errorCode.toString());
|
Log.e("ry", "发送失敗" + errorCode.toString());
|
||||||
|
refreshView.initData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -224,6 +224,7 @@ public class LiveMicAnchorDialogFragment extends AbsDialogFragment implements Vi
|
|||||||
});
|
});
|
||||||
userMicInfoAdapter = new AnchorUserMicInfoAdapter(mContext, LiveMicAnchorDialogFragment.this);
|
userMicInfoAdapter = new AnchorUserMicInfoAdapter(mContext, LiveMicAnchorDialogFragment.this);
|
||||||
userMicInfoAdapter.setLiveUid(mLiveUid);
|
userMicInfoAdapter.setLiveUid(mLiveUid);
|
||||||
|
userMicInfoAdapter.setRefreshView(mRefreshView);
|
||||||
Up();
|
Up();
|
||||||
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<MicUserBean>() {
|
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<MicUserBean>() {
|
||||||
|
Loading…
Reference in New Issue
Block a user