|
@@ -90,22 +90,22 @@ public class NoticeEditActivity extends BaseMVPActivity<TcActivityNoticeEditBind
|
|
|
|
|
|
@Override
|
|
@Override
|
|
protected void initView() {
|
|
protected void initView() {
|
|
- initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "群公告编辑");
|
|
|
|
etNotice = viewBinding.etNotice;
|
|
etNotice = viewBinding.etNotice;
|
|
etTitle = viewBinding.etTitle;
|
|
etTitle = viewBinding.etTitle;
|
|
cbRoof = viewBinding.cbRoof;
|
|
cbRoof = viewBinding.cbRoof;
|
|
btnCommit = viewBinding.btnCommit;
|
|
btnCommit = viewBinding.btnCommit;
|
|
|
|
|
|
-
|
|
|
|
Intent intent = getIntent();
|
|
Intent intent = getIntent();
|
|
targetId = intent.getStringExtra("targetId");
|
|
targetId = intent.getStringExtra("targetId");
|
|
title = intent.getStringExtra("title");
|
|
title = intent.getStringExtra("title");
|
|
|
|
+ boolean isCreate = TextUtils.isEmpty(title);
|
|
|
|
+ initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, isCreate ? "新建群公告" : "编辑群公告");
|
|
notice = intent.getStringExtra("notice");
|
|
notice = intent.getStringExtra("notice");
|
|
isTop = intent.getBooleanExtra("isTop", false);
|
|
isTop = intent.getBooleanExtra("isTop", false);
|
|
id = intent.getStringExtra("id");
|
|
id = intent.getStringExtra("id");
|
|
cbRoof.setChecked(isTop);
|
|
cbRoof.setChecked(isTop);
|
|
etTitle.setText(title);
|
|
etTitle.setText(title);
|
|
- if(TextUtils.isEmpty(title)){
|
|
|
|
|
|
+ if (isCreate) {
|
|
//默认选中
|
|
//默认选中
|
|
cbRoof.setChecked(true);
|
|
cbRoof.setChecked(true);
|
|
}
|
|
}
|
|
@@ -129,7 +129,7 @@ public class NoticeEditActivity extends BaseMVPActivity<TcActivityNoticeEditBind
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (TextUtils.isEmpty(NoticeEditActivity.this.title)) {
|
|
if (TextUtils.isEmpty(NoticeEditActivity.this.title)) {
|
|
- presenter.createGroupNotice(title,notice,targetId, cbRoof.isChecked() );
|
|
|
|
|
|
+ presenter.createGroupNotice(title, notice, targetId, cbRoof.isChecked());
|
|
} else {
|
|
} else {
|
|
presenter.noticeUpdate(id, targetId, title, notice, cbRoof.isChecked());
|
|
presenter.noticeUpdate(id, targetId, title, notice, cbRoof.isChecked());
|
|
}
|
|
}
|