mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-14 07:08:00 -05:00
Add static methods to create unifiedInbox and allMessages accounts.
This commit is contained in:
parent
a3d227649f
commit
f01f2f15cd
@ -2,7 +2,10 @@ package com.fsck.k9.search;
|
|||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
import com.fsck.k9.BaseAccount;
|
import com.fsck.k9.BaseAccount;
|
||||||
|
import com.fsck.k9.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is basically a wrapper around a LocalSearch. It allows to expose it as
|
* This class is basically a wrapper around a LocalSearch. It allows to expose it as
|
||||||
@ -10,6 +13,24 @@ import com.fsck.k9.BaseAccount;
|
|||||||
*/
|
*/
|
||||||
public class SearchAccount implements BaseAccount {
|
public class SearchAccount implements BaseAccount {
|
||||||
|
|
||||||
|
// create the all messages search ( all accounts is default when none specified )
|
||||||
|
public static SearchAccount createAllMessagesAccount(Context context) {
|
||||||
|
String name = context.getString(R.string.search_all_messages_title);
|
||||||
|
LocalSearch tmpSearch = new LocalSearch(name);
|
||||||
|
return new SearchAccount(tmpSearch, name,
|
||||||
|
context.getString(R.string.search_all_messages_detail));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// create the unified inbox meta account ( all accounts is default when none specified )
|
||||||
|
public static SearchAccount createUnifiedInboxAccount(Context context) {
|
||||||
|
String name = context.getString(R.string.integrated_inbox_title);
|
||||||
|
LocalSearch tmpSearch = new LocalSearch(name);
|
||||||
|
tmpSearch.addAllowedFolder(SearchSpecification.GENERIC_INBOX_NAME);
|
||||||
|
return new SearchAccount(tmpSearch, name,
|
||||||
|
context.getString(R.string.integrated_inbox_detail));
|
||||||
|
}
|
||||||
|
|
||||||
private String mEmail = null;
|
private String mEmail = null;
|
||||||
private String mDescription = null;
|
private String mDescription = null;
|
||||||
private LocalSearch mSearch = null;
|
private LocalSearch mSearch = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user