Added option for auto identity

This commit is contained in:
M66B
2022-04-19 18:50:12 +02:00
parent bb33dd9330
commit 189e568bdb
4 changed files with 44 additions and 3 deletions

View File

@@ -1293,10 +1293,14 @@ public class FragmentCompose extends FragmentBase {
protected Long onExecute(Context context, Bundle args) throws Throwable {
String email = args.getString("email");
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
boolean auto_identity = prefs.getBoolean("auto_identity", true);
boolean suggest_sent = prefs.getBoolean("suggest_sent", true);
boolean suggest_received = prefs.getBoolean("suggest_received", false);
if (!auto_identity)
return null;
List<Integer> types = new ArrayList<>();
if (suggest_sent)
types.add(EntityContact.TYPE_TO);