Add method for launching MessageList with an account
This commit is contained in:
parent
72b1c6ef96
commit
fa5b2b77f1
2 changed files with 9 additions and 1 deletions
|
@ -172,6 +172,14 @@ public class MessageList extends K9Activity implements MessageListFragmentListen
|
|||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void launch(Context context, Account account) {
|
||||
long folderId = DI.get(DefaultFolderProvider.class).getDefaultFolder(account);
|
||||
|
||||
LocalSearch search = new LocalSearch();
|
||||
search.addAllowedFolder(folderId);
|
||||
search.addAccountUuid(account.getUuid());
|
||||
actionDisplaySearch(context, search, false, false);
|
||||
}
|
||||
|
||||
private enum DisplayMode {
|
||||
MESSAGE_LIST,
|
||||
|
|
|
@ -90,7 +90,7 @@ public class AccountSetupNames extends K9Activity implements OnClickListener {
|
|||
}
|
||||
mAccount.setName(mName.getText().toString());
|
||||
Preferences.getPreferences(getApplicationContext()).saveAccount(mAccount);
|
||||
MessageList.launch(this);
|
||||
MessageList.launch(this, mAccount);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue