mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
remove unused updateProviderInfo(DcProvider)
This commit is contained in:
@@ -427,9 +427,8 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve
|
||||
|
||||
private void updateProviderInfo() {
|
||||
Util.runOnBackground(() -> {
|
||||
DcProvider newProvider = getContext(this).getProviderFromEmailWithDns(emailInput.getText().toString());
|
||||
provider = getContext(this).getProviderFromEmailWithDns(emailInput.getText().toString());
|
||||
Util.runOnMain(() -> {
|
||||
provider = newProvider;
|
||||
if (provider!=null) {
|
||||
Resources res = getResources();
|
||||
providerHint.setText(provider.getBeforeLoginHint());
|
||||
@@ -459,35 +458,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve
|
||||
});
|
||||
}
|
||||
|
||||
private void updateProviderInfo(DcProvider newProvider) {
|
||||
provider = newProvider;
|
||||
if (provider!=null) {
|
||||
Resources res = getResources();
|
||||
providerHint.setText(provider.getBeforeLoginHint());
|
||||
switch (provider.getStatus()) {
|
||||
case DcProvider.DC_PROVIDER_STATUS_PREPARATION:
|
||||
providerHint.setTextColor(res.getColor(R.color.provider_prep_fg));
|
||||
providerLink.setTextColor(res.getColor(R.color.provider_prep_fg));
|
||||
providerLayout.setBackgroundColor(res.getColor(R.color.provider_prep_bg));
|
||||
providerLayout.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
|
||||
case DcProvider.DC_PROVIDER_STATUS_BROKEN:
|
||||
providerHint.setTextColor(res.getColor(R.color.provider_broken_fg));
|
||||
providerLink.setTextColor(res.getColor(R.color.provider_broken_fg));
|
||||
providerLayout.setBackgroundColor(getResources().getColor(R.color.provider_broken_bg));
|
||||
providerLayout.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
|
||||
default:
|
||||
providerLayout.setVisibility(View.GONE);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
providerLayout.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void maybeCleanProviderInfo() {
|
||||
if (provider!=null && providerLayout.getVisibility()==View.VISIBLE) {
|
||||
provider = null;
|
||||
|
||||
Reference in New Issue
Block a user