mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-06-08 16:26:24 +01:00
Don't crash on recipient preference change for non-signal user
Fixes #5760 // FREEBIe
This commit is contained in:
@@ -295,16 +295,16 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
||||
@Override
|
||||
public void onSuccess(Optional<IdentityKey> result) {
|
||||
if (result.isPresent()) {
|
||||
identityPreference.setOnPreferenceClickListener(new IdentityClickedListener(result.get()));
|
||||
identityPreference.setEnabled(true);
|
||||
if (identityPreference != null) identityPreference.setOnPreferenceClickListener(new IdentityClickedListener(result.get()));
|
||||
if (identityPreference != null) identityPreference.setEnabled(true);
|
||||
} else {
|
||||
getPreferenceScreen().removePreference(identityPreference);
|
||||
if (identityPreference != null) getPreferenceScreen().removePreference(identityPreference);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(ExecutionException e) {
|
||||
getPreferenceScreen().removePreference(identityPreference);
|
||||
if (identityPreference != null) getPreferenceScreen().removePreference(identityPreference);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user