mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-02 00:25:10 -04:00
Don't use EmailAddressAdapter as singleton
This commit is contained in:
parent
981c582e9e
commit
52b5c567ef
@ -25,22 +25,11 @@ import android.widget.ResourceCursorAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class EmailAddressAdapter extends ResourceCursorAdapter {
|
||||
private static EmailAddressAdapter sInstance;
|
||||
|
||||
public static EmailAddressAdapter getInstance(Context context) {
|
||||
if (sInstance == null) {
|
||||
sInstance = new EmailAddressAdapter(context);
|
||||
}
|
||||
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
|
||||
private final Contacts mContacts;
|
||||
|
||||
private EmailAddressAdapter(Context context) {
|
||||
public EmailAddressAdapter(Context context) {
|
||||
super(context, R.layout.recipient_dropdown_item, null);
|
||||
mContacts = Contacts.getInstance(context);
|
||||
mContacts = Contacts.getInstance(context.getApplicationContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -416,7 +416,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
|
||||
mContacts = Contacts.getInstance(MessageCompose.this);
|
||||
|
||||
mAddressAdapter = EmailAddressAdapter.getInstance(this);
|
||||
mAddressAdapter = new EmailAddressAdapter(this);
|
||||
mAddressValidator = new EmailAddressValidator();
|
||||
|
||||
mChooseIdentityButton = (Button) findViewById(R.id.identity);
|
||||
|
Loading…
Reference in New Issue
Block a user