Skip to content
Browse files

Run parser after Sync

  • Loading branch information...
1 parent 0aff436 commit b02e9cee5cf675ed3d9f0fc2b0d41c72dfce0c1b @matburt committed Feb 23, 2010
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/com/matburt/mobileorg/MobileOrgActivity.java
View
13 src/com/matburt/mobileorg/MobileOrgActivity.java
@@ -91,15 +91,19 @@ public void onCreate(Bundle savedInstanceState)
this.initializeTables();
}
+ public void runParser() {
+ ArrayList<String> allOrgList = this.getOrgFiles();
+ OrgFileParser ofp = new OrgFileParser(allOrgList);
+ ofp.parse();
+ appInst.rootNode = ofp.rootNode;
+ }
+
@Override
public void onResume() {
super.onResume();
MobileOrgApplication appInst = (MobileOrgApplication)this.getApplication();
if (appInst.rootNode == null) {
- ArrayList<String> allOrgList = this.getOrgFiles();
- OrgFileParser ofp = new OrgFileParser(allOrgList);
- ofp.parse();
- appInst.rootNode = ofp.rootNode;
+ this.runParser();
}
Intent nodeIntent = getIntent();
@@ -154,6 +158,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
case MobileOrgActivity.OP_MENU_SYNC:
appSync = new Synchronizer(this);
appSync.pull();
+ this.runParser();
this.onResume();
return true;
case MobileOrgActivity.OP_MENU_SETTINGS:

0 comments on commit b02e9ce

Please sign in to comment.
Something went wrong with that request. Please try again.