Prevent crash

This commit is contained in:
M66B 2022-04-23 09:56:48 +02:00
parent 2d57e07682
commit 13773c97c7
8 changed files with 27 additions and 0 deletions

View File

@ -356,6 +356,9 @@ public class FragmentAccount extends FragmentBase {
@Override
public void afterTextChanged(Editable s) {
if (tilPassword == null)
return;
String password = s.toString();
boolean warning = (Helper.containsWhiteSpace(password) ||
Helper.containsControlChars(password));

View File

@ -637,6 +637,9 @@ public class FragmentCompose extends FragmentBase {
@Override
public void afterTextChanged(Editable text) {
if (etBody == null)
return;
LogPrinter lp = null;
if (BuildConfig.DEBUG &&
(added != null || removed != null))

View File

@ -65,6 +65,9 @@ public class FragmentDialogInsertLink extends FragmentDialogBase {
@Override
public void afterTextChanged(Editable editable) {
if (tvInsecure == null)
return;
Uri uri = Uri.parse(editable.toString());
tvInsecure.setVisibility(!uri.isOpaque() &&
"http".equals(uri.getScheme()) ? View.VISIBLE : View.GONE);

View File

@ -181,6 +181,9 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
@Override
public void afterTextChanged(Editable editable) {
if (cbSecure == null)
return;
Uri uri = Uri.parse(editable.toString());
boolean secure = UriHelper.isSecure(uri);

View File

@ -304,6 +304,9 @@ public class FragmentIdentity extends FragmentBase {
@Override
public void afterTextChanged(Editable editable) {
if (etDomain == null)
return;
String[] email = editable.toString().split("@");
etDomain.setText(email.length < 2 ? null : email[1]);
}
@ -324,6 +327,9 @@ public class FragmentIdentity extends FragmentBase {
@Override
public void afterTextChanged(Editable s) {
if (tilPassword == null)
return;
checkPassword(s.toString());
}
});

View File

@ -205,6 +205,9 @@ public class FragmentPop extends FragmentBase {
@Override
public void afterTextChanged(Editable s) {
if (tilPassword == null)
return;
String password = s.toString();
boolean warning = (Helper.containsWhiteSpace(password) ||
Helper.containsControlChars(password));

View File

@ -199,6 +199,9 @@ public class FragmentQuickSetup extends FragmentBase {
@Override
public void afterTextChanged(Editable s) {
if (tvCharacters == null)
return;
String password = s.toString();
boolean warning = (Helper.containsWhiteSpace(password) ||
Helper.containsControlChars(password));

View File

@ -634,6 +634,9 @@ public class FragmentRule extends FragmentBase {
@Override
public void afterTextChanged(Editable s) {
if (cbResend == null)
return;
cbResend.setEnabled(!TextUtils.isEmpty(s.toString()));
}
});