OSDN Git Service

Correct trash counts.
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / threads / CounterRunner.java
index 7978804..3531964 100644 (file)
@@ -172,13 +172,13 @@ public class CounterRunner extends QObject implements Runnable {
                        for (int j=0; j<nCounter.size(); j++) {\r
                                if (abortCount)\r
                                        return;\r
-                               if (nCounter.get(j).getGuid().equals(records.get(i).notebookGuid)) {\r
+                               if (records.get(i).active && nCounter.get(j).getGuid().equals(records.get(i).notebookGuid)) {\r
                                        nCounter.get(j).setCount(nCounter.get(j).getCount()+1);\r
                                        found = true;\r
                                        j=nCounter.size();\r
                                }\r
                        }\r
-                       if (!found) {\r
+                       if (!found && records.get(i).active) {\r
                                NotebookCounter newCounter = new NotebookCounter();\r
                                newCounter.setGuid(records.get(i).notebookGuid);\r
                                newCounter.setCount(1);\r
@@ -313,6 +313,7 @@ public class CounterRunner extends QObject implements Runnable {
                if (abortCount)\r
                        return;\r
 \r
+               System.out.println("***"+tCounter);\r
                trashSignal.countChanged.emit(tCounter);\r
                logger.log(logger.EXTREME, "Leaving CounterRunner.countTrashResults()");\r
        }\r