mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 17:27:45 +00:00
parent
b8fbc91f33
commit
821957137a
@ -517,8 +517,11 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
final Context context = getContext();
|
||||||
|
if (context == null) return true;
|
||||||
|
|
||||||
final int value = (Integer) newValue;
|
final int value = (Integer) newValue;
|
||||||
final MaterialColor selectedColor = MaterialColors.CONVERSATION_PALETTE.getByColor(getActivity(), value);
|
final MaterialColor selectedColor = MaterialColors.CONVERSATION_PALETTE.getByColor(context, value);
|
||||||
final MaterialColor currentColor = recipient.getColor();
|
final MaterialColor currentColor = recipient.getColor();
|
||||||
|
|
||||||
if (selectedColor == null) return true;
|
if (selectedColor == null) return true;
|
||||||
@ -527,7 +530,6 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|||||||
new AsyncTask<Void, Void, Void>() {
|
new AsyncTask<Void, Void, Void>() {
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground(Void... params) {
|
protected Void doInBackground(Void... params) {
|
||||||
Context context = getActivity();
|
|
||||||
DatabaseFactory.getRecipientDatabase(context).setColor(recipient, selectedColor);
|
DatabaseFactory.getRecipientDatabase(context).setColor(recipient, selectedColor);
|
||||||
|
|
||||||
if (recipient.resolve().getRegistered() == RecipientDatabase.RegisteredState.REGISTERED) {
|
if (recipient.resolve().getRegistered() == RecipientDatabase.RegisteredState.REGISTERED) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user