只能+86登录注册

去掉退群通知
This commit is contained in:
guozhen
2025-01-02 16:27:02 +08:00
committed by xuhuixiang
parent 5bd7185d47
commit ba8e40323d
10 changed files with 59 additions and 61 deletions

View File

@@ -96,21 +96,21 @@ public class PhoneLoginActivity extends BaseActivity {
countryBean = DataUtils.getLocCountry(PhoneLoginActivity.this);
changeArea();
activityWelcomeBinding.areaTv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SelectCountryDialog selectCountryDialog = new SelectCountryDialog(PhoneLoginActivity.this);
selectCountryDialog.setOnToVipListener(new SelectCountryDialog.OnToTypeListener() {
@Override
public void toType(CountryBean type) {
countryBean = type;
changeArea();
DataUtils.set(PhoneLoginActivity.this, IMUIKitConfig.LOC_COUNTRY_CODE, type.getAreaCodeName());
}
});
selectCountryDialog.show();
}
});
// activityWelcomeBinding.areaTv.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// SelectCountryDialog selectCountryDialog = new SelectCountryDialog(PhoneLoginActivity.this);
// selectCountryDialog.setOnToVipListener(new SelectCountryDialog.OnToTypeListener() {
// @Override
// public void toType(CountryBean type) {
// countryBean = type;
// changeArea();
// DataUtils.set(PhoneLoginActivity.this, IMUIKitConfig.LOC_COUNTRY_CODE, type.getAreaCodeName());
// }
// });
// selectCountryDialog.show();
// }
// });
activityWelcomeBinding.nextIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

View File

@@ -158,18 +158,18 @@ public class RegisterActivity extends BaseActivity {
countryBean = DataUtils.getLocCountry(RegisterActivity.this);
changeArea();
activityWelcomeBinding.areaTv.setOnClickListener(v -> {
SelectCountryDialog selectCountryDialog = new SelectCountryDialog(RegisterActivity.this);
selectCountryDialog.setOnToVipListener(new SelectCountryDialog.OnToTypeListener() {
@Override
public void toType(CountryBean type) {
countryBean = type;
changeArea();
DataUtils.set(RegisterActivity.this, IMUIKitConfig.LOC_COUNTRY_CODE, type.getAreaCodeName());
}
});
selectCountryDialog.show();
});
// activityWelcomeBinding.areaTv.setOnClickListener(v -> {
// SelectCountryDialog selectCountryDialog = new SelectCountryDialog(RegisterActivity.this);
// selectCountryDialog.setOnToVipListener(new SelectCountryDialog.OnToTypeListener() {
// @Override
// public void toType(CountryBean type) {
// countryBean = type;
// changeArea();
// DataUtils.set(RegisterActivity.this, IMUIKitConfig.LOC_COUNTRY_CODE, type.getAreaCodeName());
// }
// });
// selectCountryDialog.show();
// });
activityWelcomeBinding.nextIv.setOnClickListener(v -> {
if(lastTime>0){
if(System.currentTimeMillis()-lastTime<2000){

View File

@@ -203,15 +203,15 @@ public class ChangePhoneActivity extends BaseActivity {
countryBean = DataUtils.getLocCountry(ChangePhoneActivity.this);
changeArea();
binding.areaTv.setOnClickListener(v -> {
SelectCountryDialog selectCountryDialog = new SelectCountryDialog(ChangePhoneActivity.this);
selectCountryDialog.setOnToVipListener(type -> {
countryBean = type;
changeArea();
DataUtils.set(ChangePhoneActivity.this, IMUIKitConfig.LOC_COUNTRY_CODE, type.getAreaCodeName());
});
selectCountryDialog.show();
});
// binding.areaTv.setOnClickListener(v -> {
// SelectCountryDialog selectCountryDialog = new SelectCountryDialog(ChangePhoneActivity.this);
// selectCountryDialog.setOnToVipListener(type -> {
// countryBean = type;
// changeArea();
// DataUtils.set(ChangePhoneActivity.this, IMUIKitConfig.LOC_COUNTRY_CODE, type.getAreaCodeName());
// });
// selectCountryDialog.show();
// });
myCountDownTimer = new MyCountDownTimer(60000, 1000);
myCountDownTimer1 = new MyCountDownTimer1(60000, 1000);

View File

@@ -150,18 +150,18 @@ public class DataUtils {
* @return
*/
public static CountryBean getLocCountry(Context context) {
String areaCode;
try {
areaCode = DataUtils.get(context, IMUIKitConfig.LOC_COUNTRY_CODE, "+86");
} catch (Exception e) {
areaCode = "+" + DataUtils.get(context, IMUIKitConfig.LOC_COUNTRY_CODE, 86); //兼容老版本
}
List<CountryBean> countryBeans = getCountry(context);
for (CountryBean country : countryBeans) {
if (country.getAreaCodeName().equals(areaCode)) {
return country;
}
}
// String areaCode;
// try {
// areaCode = DataUtils.get(context, IMUIKitConfig.LOC_COUNTRY_CODE, "+86");
// } catch (Exception e) {
// areaCode = "+" + DataUtils.get(context, IMUIKitConfig.LOC_COUNTRY_CODE, 86); //兼容老版本
// }
// List<CountryBean> countryBeans = getCountry(context);
// for (CountryBean country : countryBeans) {
// if (country.getAreaCodeName().equals(areaCode)) {
// return country;
// }
// }
return new CountryBean("+86", context.getString(R.string.zhongguo_txt));
}