|
@@ -17,6 +17,7 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
import com.chad.library.adapter.base.listener.OnItemClickListener;
|
|
import com.chad.library.adapter.base.listener.OnItemClickListener;
|
|
import com.cooleshow.base.bean.StudentPageListBean;
|
|
import com.cooleshow.base.bean.StudentPageListBean;
|
|
import com.cooleshow.base.common.BaseApplication;
|
|
import com.cooleshow.base.common.BaseApplication;
|
|
|
|
+import com.cooleshow.base.constanst.StyleConfig;
|
|
import com.cooleshow.base.router.RouterPath;
|
|
import com.cooleshow.base.router.RouterPath;
|
|
import com.cooleshow.base.ui.activity.BaseMVPActivity;
|
|
import com.cooleshow.base.ui.activity.BaseMVPActivity;
|
|
import com.cooleshow.base.utils.GlideUtils;
|
|
import com.cooleshow.base.utils.GlideUtils;
|
|
@@ -24,6 +25,7 @@ import com.cooleshow.base.utils.JumpUtils;
|
|
import com.cooleshow.base.utils.LogUtils;
|
|
import com.cooleshow.base.utils.LogUtils;
|
|
import com.cooleshow.base.utils.ToastUtil;
|
|
import com.cooleshow.base.utils.ToastUtil;
|
|
import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
|
|
import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
|
|
|
|
+import com.cooleshow.base.widgets.dialog.CommonConfirmDialog;
|
|
import com.cooleshow.base.widgets.dialog.CommonDialog;
|
|
import com.cooleshow.base.widgets.dialog.CommonDialog;
|
|
import com.cooleshow.chatmodule.R;
|
|
import com.cooleshow.chatmodule.R;
|
|
import com.cooleshow.chatmodule.adapter.GroupSettingMemberAdapter;
|
|
import com.cooleshow.chatmodule.adapter.GroupSettingMemberAdapter;
|
|
@@ -36,6 +38,7 @@ import com.cooleshow.chatmodule.databinding.TcActivityChatGroupSettingBinding;
|
|
import com.cooleshow.chatmodule.presenter.ChatGroupSettingPresenter;
|
|
import com.cooleshow.chatmodule.presenter.ChatGroupSettingPresenter;
|
|
import com.cooleshow.chatmodule.utils.helper.ChatGroupHelper;
|
|
import com.cooleshow.chatmodule.utils.helper.ChatGroupHelper;
|
|
import com.cooleshow.chatmodule.utils.helper.IMThemManager;
|
|
import com.cooleshow.chatmodule.utils.helper.IMThemManager;
|
|
|
|
+import com.cooleshow.chatmodule.widget.CommonConfirmDialog2;
|
|
import com.cooleshow.usercenter.helper.UserHelper;
|
|
import com.cooleshow.usercenter.helper.UserHelper;
|
|
import com.tencent.qcloud.tuicore.TUICore;
|
|
import com.tencent.qcloud.tuicore.TUICore;
|
|
import com.tencent.qcloud.tuikit.tuigroup.bean.GroupInfo;
|
|
import com.tencent.qcloud.tuikit.tuigroup.bean.GroupInfo;
|
|
@@ -109,24 +112,28 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
|
|
showConfirmDialog();
|
|
showConfirmDialog();
|
|
} else {
|
|
} else {
|
|
//发消息
|
|
//发消息
|
|
- finish();
|
|
|
|
|
|
+ showQuitConfirmDialog();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private void showQuitConfirmDialog() {
|
|
private void showQuitConfirmDialog() {
|
|
- CommonDialog commonDialog = new CommonDialog(this);
|
|
|
|
|
|
+ CommonConfirmDialog2 commonDialog = new CommonConfirmDialog2(this);
|
|
commonDialog.show();
|
|
commonDialog.show();
|
|
- commonDialog.setTitle("提示");
|
|
|
|
- commonDialog.setContent("确认退出该群聊吗?");
|
|
|
|
|
|
+ commonDialog.setTitle("退出群聊");
|
|
|
|
+ commonDialog.setContent("请确认是否要退出群聊?");
|
|
|
|
+ commonDialog.setCancelText("确认");
|
|
|
|
+ commonDialog.setCancelBackground(R.drawable.shape_2dc7aa_20dp, com.cooleshow.base.R.color.white);
|
|
|
|
+ commonDialog.setConfirmText("取消");
|
|
|
|
+ commonDialog.setConfirmBackground(R.drawable.shape_border_dbdbdb_1dp_20dp, com.cooleshow.base.R.color.color_333333);
|
|
|
|
+ IMThemManager.getInstance().setTextDrawableStyle(commonDialog.getTvCancel());
|
|
commonDialog.setOnConfirmClickListener(new View.OnClickListener() {
|
|
commonDialog.setOnConfirmClickListener(new View.OnClickListener() {
|
|
@Override
|
|
@Override
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
if (commonDialog != null) {
|
|
if (commonDialog != null) {
|
|
commonDialog.dismiss();
|
|
commonDialog.dismiss();
|
|
}
|
|
}
|
|
- presenter.quitChatGroup(targetId);
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
commonDialog.setOnCancelClickListener(new View.OnClickListener() {
|
|
commonDialog.setOnCancelClickListener(new View.OnClickListener() {
|
|
@@ -135,6 +142,7 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
|
|
if (commonDialog != null) {
|
|
if (commonDialog != null) {
|
|
commonDialog.dismiss();
|
|
commonDialog.dismiss();
|
|
}
|
|
}
|
|
|
|
+ presenter.quitChatGroup(targetId);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -209,7 +217,7 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
|
|
viewBinding.tvGroupNameRemarks.setClickable(true);
|
|
viewBinding.tvGroupNameRemarks.setClickable(true);
|
|
viewBinding.tvGroupNameRemarks.setCompoundDrawablesWithIntrinsicBounds(0, 0, com.cooleshow.base.R.drawable.icon_arrow_right, 0);
|
|
viewBinding.tvGroupNameRemarks.setCompoundDrawablesWithIntrinsicBounds(0, 0, com.cooleshow.base.R.drawable.icon_arrow_right, 0);
|
|
} else {
|
|
} else {
|
|
- btnConfirm.setText("发消息");
|
|
|
|
|
|
+ btnConfirm.setText("退出群聊");
|
|
viewBinding.llChatJoinApply.setVisibility(View.GONE);
|
|
viewBinding.llChatJoinApply.setVisibility(View.GONE);
|
|
viewBinding.tvGroupNameRemarks.setClickable(false);
|
|
viewBinding.tvGroupNameRemarks.setClickable(false);
|
|
viewBinding.tvGroupNameRemarks.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
|
|
viewBinding.tvGroupNameRemarks.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
|
|
@@ -387,6 +395,11 @@ public class ChatGroupSettingActivity extends BaseMVPActivity<TcActivityChatGrou
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
ToastUtil.getInstance().showShort("退出成功");
|
|
ToastUtil.getInstance().showShort("退出成功");
|
|
|
|
+ if (UserHelper.isTenantAccount()) {
|
|
|
|
+ JumpUtils.jumpJGMainAndSelectChild(1, 0);
|
|
|
|
+ } else {
|
|
|
|
+ JumpUtils.jumpMain(2);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|