OSDN Git Service

Put timelimit on notes where a thumbnail won't be immediately updated.
authorRandy Baumgarte <randy@fbn.cx>
Tue, 2 Nov 2010 13:23:49 +0000 (09:23 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Tue, 2 Nov 2010 13:23:49 +0000 (09:23 -0400)
src/cx/fbn/nevernote/sql/NoteTable.java

index 7290f38..c136300 100644 (file)
@@ -1092,7 +1092,6 @@ public class NoteTable {
                                        \r
                check = query.prepare("Update note set thumbnail = :thumbnail where guid=:guid");\r
                query.bindValue(":guid", guid);\r
-               int x = thumbnail.size();\r
                query.bindValue(":thumbnail", thumbnail.toByteArray());\r
                check = query.exec();\r
                if (!check) \r
@@ -1155,7 +1154,7 @@ public class NoteTable {
                boolean check;\r
         NSqlQuery query = new NSqlQuery(db.getConnection());\r
                                        \r
-               check = query.prepare("select guid from note where thumbnailneeded=true and isExpunged=false limit 5");\r
+               check = query.prepare("select guid from note where thumbnailneeded=true and isExpunged=false and DATEDIFF('MINUTE',updated,CURRENT_TIMESTAMP)>5 limit 5");\r
                check = query.exec();\r
                if (!check) \r
                        logger.log(logger.EXTREME, "Note SQL findThumbnailsNeeded query failed: " +query.lastError().toString());\r