mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +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
|
@Override
|
||||||
public void onSuccess(Optional<IdentityKey> result) {
|
public void onSuccess(Optional<IdentityKey> result) {
|
||||||
if (result.isPresent()) {
|
if (result.isPresent()) {
|
||||||
identityPreference.setOnPreferenceClickListener(new IdentityClickedListener(result.get()));
|
if (identityPreference != null) identityPreference.setOnPreferenceClickListener(new IdentityClickedListener(result.get()));
|
||||||
identityPreference.setEnabled(true);
|
if (identityPreference != null) identityPreference.setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
getPreferenceScreen().removePreference(identityPreference);
|
if (identityPreference != null) getPreferenceScreen().removePreference(identityPreference);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(ExecutionException e) {
|
public void onFailure(ExecutionException e) {
|
||||||
getPreferenceScreen().removePreference(identityPreference);
|
if (identityPreference != null) getPreferenceScreen().removePreference(identityPreference);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user