Commits

Anonymous committed d30a49a

Fix #69, if the pipe symbol is missing from the todo list mark the last item as a DONE item

  • Participants
  • Parent commits 8166d00

Comments (0)

Files changed (1)

File src/com/matburt/mobileorg/Synchronizers/Synchronizer.java

         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++) {
                     }
                     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;