[BugFix]修复1.6.0bug
This commit is contained in:
@@ -5087,5 +5087,6 @@
|
|||||||
<string name="sure_to_agree_user_join_room">確定通過該用戶加入房間的申請嗎?</string>
|
<string name="sure_to_agree_user_join_room">確定通過該用戶加入房間的申請嗎?</string>
|
||||||
<string name="sure_to_refuse_user_join_room">確定拒绝該用戶加入房間的申請嗎?</string>
|
<string name="sure_to_refuse_user_join_room">確定拒绝該用戶加入房間的申請嗎?</string>
|
||||||
<string name="seven_day_can_no_receive_apply">7天内不再接受該用戶的申請</string>
|
<string name="seven_day_can_no_receive_apply">7天内不再接受該用戶的申請</string>
|
||||||
|
<string name="sure_to_refuse_room_join_apply">確定拒绝該房間的加入邀請嗎?</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@@ -17,7 +17,6 @@ import androidx.core.content.ContextCompat;
|
|||||||
|
|
||||||
import com.yizhuan.erban.R;
|
import com.yizhuan.erban.R;
|
||||||
import com.yizhuan.erban.ui.widget.dialog.BaseDialog;
|
import com.yizhuan.erban.ui.widget.dialog.BaseDialog;
|
||||||
import com.yizhuan.xchat_android_core.DemoCache;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wushaocheng
|
* @author wushaocheng
|
||||||
@@ -26,6 +25,9 @@ import com.yizhuan.xchat_android_core.DemoCache;
|
|||||||
*/
|
*/
|
||||||
public class RefuseApplyDialog extends BaseDialog {
|
public class RefuseApplyDialog extends BaseDialog {
|
||||||
|
|
||||||
|
private String tipMsg = "";
|
||||||
|
private boolean isInvite = false;
|
||||||
|
|
||||||
public RefuseApplyDialog(Context context) {
|
public RefuseApplyDialog(Context context) {
|
||||||
super(context, R.style.dialog);
|
super(context, R.style.dialog);
|
||||||
init();
|
init();
|
||||||
@@ -43,10 +45,10 @@ public class RefuseApplyDialog extends BaseDialog {
|
|||||||
|
|
||||||
AppCompatTextView tvName = findViewById(R.id.tv_tip);
|
AppCompatTextView tvName = findViewById(R.id.tv_tip);
|
||||||
if (tvName != null) {
|
if (tvName != null) {
|
||||||
String tip = getContext().getString(R.string.sure_to_refuse_user_join_room);
|
String tip = tipMsg;
|
||||||
SpannableStringBuilder builder = new SpannableStringBuilder(tip);
|
SpannableStringBuilder builder = new SpannableStringBuilder(tip);
|
||||||
builder.setSpan(
|
builder.setSpan(
|
||||||
new ForegroundColorSpan(ContextCompat.getColor(getContext(),R.color.color_F92020)), 2,
|
new ForegroundColorSpan(ContextCompat.getColor(getContext(), R.color.color_F92020)), 2,
|
||||||
4,
|
4,
|
||||||
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||||
);
|
);
|
||||||
@@ -54,9 +56,14 @@ public class RefuseApplyDialog extends BaseDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CheckBox checkBox = findViewById(R.id.tv_refuse_tip);
|
CheckBox checkBox = findViewById(R.id.tv_refuse_tip);
|
||||||
if(checkBox != null) {
|
if (checkBox != null) {
|
||||||
checkBox.setHighlightColor(Color.TRANSPARENT);
|
if (isInvite) {
|
||||||
checkBox.setMovementMethod(new LinkMovementMethod());
|
checkBox.setVisibility(View.VISIBLE);
|
||||||
|
checkBox.setHighlightColor(Color.TRANSPARENT);
|
||||||
|
checkBox.setMovementMethod(new LinkMovementMethod());
|
||||||
|
} else {
|
||||||
|
checkBox.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageView close = findViewById(R.id.iv_close);
|
ImageView close = findViewById(R.id.iv_close);
|
||||||
@@ -87,6 +94,14 @@ public class RefuseApplyDialog extends BaseDialog {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setTipMsg(String tipMsg) {
|
||||||
|
this.tipMsg = tipMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsInvite(boolean isInvite) {
|
||||||
|
this.isInvite = isInvite;
|
||||||
|
}
|
||||||
|
|
||||||
private OnActionListener l;
|
private OnActionListener l;
|
||||||
|
|
||||||
public void setOnActionListener(OnActionListener l) {
|
public void setOnActionListener(OnActionListener l) {
|
||||||
|
@@ -227,6 +227,13 @@ public class HallMsgViewHolder extends MsgViewHolderBase {
|
|||||||
});
|
});
|
||||||
stvReject.setOnClickListener(view -> {
|
stvReject.setOnClickListener(view -> {
|
||||||
RefuseApplyDialog dialog = new RefuseApplyDialog(context);
|
RefuseApplyDialog dialog = new RefuseApplyDialog(context);
|
||||||
|
if(info.getUrl().contains("hall/dealInvite")){
|
||||||
|
dialog.setIsInvite(false);
|
||||||
|
dialog.setTipMsg(context.getString(R.string.sure_to_refuse_room_join_apply));
|
||||||
|
}else {
|
||||||
|
dialog.setIsInvite(true);
|
||||||
|
dialog.setTipMsg(context.getString(R.string.sure_to_refuse_user_join_room));
|
||||||
|
}
|
||||||
dialog.setOnActionListener(new RefuseApplyDialog.OnActionListener() {
|
dialog.setOnActionListener(new RefuseApplyDialog.OnActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onOk(Boolean isCheck) {
|
public void onOk(Boolean isCheck) {
|
||||||
|
Reference in New Issue
Block a user