1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-08 04:08:15 -05:00

Skip to the 'enter new account login' activity when no accounts were found on the device. When we do actually scan the sd-card this can no longer be implemented this way since then data will be added from another thread. A progress dialog or something will have to be used.

This commit is contained in:
Sander Bogaert 2012-04-30 14:52:57 +02:00 committed by Andrew Chen
parent 92cd70c068
commit 48d09891cd

View File

@ -70,6 +70,11 @@ public class AccountSetupIndex extends K9ListActivity implements OnItemClickList
fillFromDevice(accountAdapter);
new BackupScan().execute();
// if no accounts on device were found go straight to new acc screen
if( accountAdapter.getCount() == 0 ){
AccountSetupGetLogin.startForResult(this);
}
// configuring the view
ListView listView = getListView();
listView.setOnItemClickListener(this);
@ -99,7 +104,6 @@ public class AccountSetupIndex extends K9ListActivity implements OnItemClickList
public void onClick(View view) {
switch (view.getId()) {
case R.id.new_account:
//showDialog(DIALOG_NEW_ACCOUNT);
AccountSetupGetLogin.startForResult(this);
break;
}