mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 08:47:46 +00:00
Don't crash on recipient preference change for non-signal user
Fixes #5760 // FREEBIe
This commit is contained in:
parent
338c0d82e1
commit
21258f244c
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user