侧边栏修改

This commit is contained in:
18401019693 2022-11-15 16:03:41 +08:00
parent 383e8c0859
commit 85971339d4
4 changed files with 20 additions and 4 deletions

View File

@ -10,6 +10,8 @@ import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.R;
import com.yunbao.common.bean.CustomSidebarChildModel;
import com.yunbao.common.event.CustomDrawerPopupEvent;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.views.DrawerTaskChildViewHolder;
import java.util.ArrayList;
@ -38,9 +40,8 @@ public class DrawerTaskAdapter extends RecyclerView.Adapter {
@Override
public void giftSuccess(CustomSidebarChildModel model, int index) {
//将领取的任务移动至任务列表尾部
child.remove(index);
child.add(child.size() - 1, model);
notifyDataSetChanged();
Bus.get().post(new CustomDrawerPopupEvent()
.setDisMiss(false).setRefresh(true));
}
});
}

View File

@ -19,6 +19,17 @@ public class CustomDrawerPopupEvent extends BaseModel {
private boolean online = false;
//举报
private boolean reportLayout = false;
//刷新
private boolean refresh = false;
public boolean isRefresh() {
return refresh;
}
public CustomDrawerPopupEvent setRefresh(boolean refresh) {
this.refresh = refresh;
return this;
}
public boolean isSystemNotice() {
return systemNotice;

View File

@ -219,6 +219,10 @@ public class CustomDrawerPopupView extends DrawerPopupView {
dismiss();
callBack.reportLayout();
}
}
if (event.isRefresh()) {
initData();
}
//是否关闭弹窗
if (event.isDisMiss()) {

View File

@ -62,7 +62,7 @@ public class VoiceDialog extends AbsDialogFragment {
public String sendMessage() {
return voiceChat.getText().toString();
return WordsTypeUtil.changeTraditional(builder.toString());
}
@Override