Started implemented logic to do blocking gtasks import from the preferences

pull/14/head
Sam Bosley 13 years ago
parent 1241967d73
commit 33a93a40ab

@ -61,11 +61,36 @@ public class GtasksPreferences extends SyncProviderPreferences {
startLogin();
}
} else {
setResult(RESULT_CODE_SYNCHRONIZE);
finish();
syncOrImport();
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_LOGIN && resultCode == RESULT_OK) {
syncOrImport();
} else {
super.onActivityResult(requestCode, resultCode, data);
}
}
private void syncOrImport() {
if (actFmPreferenceService.isLoggedIn()) {
startBlockingImport();
} else {
setResultForSynchronize();
}
}
private void setResultForSynchronize() {
setResult(RESULT_CODE_SYNCHRONIZE);
finish();
}
private void startBlockingImport() {
//TODO: Implement me
}
private void startLogin() {
Intent intent = new Intent(this, GtasksLoginActivity.class);
startActivityForResult(intent, REQUEST_LOGIN);

Loading…
Cancel
Save