Skip to content

Commit

Permalink
Fix #69, if the pipe symbol is missing from the todo list mark the la…
Browse files Browse the repository at this point in the history
…st item as a DONE item
  • Loading branch information
matburt committed May 6, 2011
1 parent ed3f64f commit fdcaccb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/com/matburt/mobileorg/Synchronizers/Synchronizer.java
Expand Up @@ -221,6 +221,7 @@ ArrayList<HashMap<String, Boolean>> getTodos(String master) {
Matcher m = getTodos.matcher(master);
ArrayList<HashMap<String, Boolean>> todoList = new ArrayList<HashMap<String, Boolean>>();
while (m.find()) {
String lastTodo = "";
HashMap<String, Boolean> holding = new HashMap<String, Boolean>();
Boolean isDone = false;
for (int idx = 1; idx <= m.groupCount(); idx++) {
Expand All @@ -232,11 +233,15 @@ ArrayList<HashMap<String, Boolean>> getTodos(String master) {
}
String[] grouping = m.group(idx).split("\\s+");
for (int jdx = 0; jdx < grouping.length; jdx++) {
lastTodo = grouping[jdx].trim();
holding.put(grouping[jdx].trim(),
isDone);
}
}
}
if (!isDone) {
holding.put(lastTodo, true);
}
todoList.add(holding);
}
return todoList;
Expand Down

0 comments on commit fdcaccb

Please sign in to comment.