summaryrefslogtreecommitdiff
path: root/offline.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-02-17 12:22:31 +0300
committerAndrew Dolgov <[email protected]>2009-02-17 12:22:31 +0300
commit492a4a6ac8c63239ecf67fda0acfc2afca9df457 (patch)
tree225e0ce45d5cf1f76735e38dee16818154f81126 /offline.js
parent65c0779b7750e1c80827d852d97b8ca233f7454e (diff)
offline: sync marked/unread status
Diffstat (limited to 'offline.js')
-rw-r--r--offline.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/offline.js b/offline.js
index 2a4466797..9054ea455 100644
--- a/offline.js
+++ b/offline.js
@@ -658,8 +658,17 @@ function offline_download_parse(stage, transport) {
if (sync_ok.length > 0) {
for (var i = 0; i < sync_ok.length; i++) {
var id = sync_ok[i].getAttribute("id");
+ var unread = sync_ok[i].getAttribute("unread");
+ var marked = sync_ok[i].getAttribute("marked");
+
if (id) {
debug("synced offline info for id " + id);
+
+ if (unread != undefined && marked != undefined) {
+ db.execute("UPDATE articles SET "+
+ "unread = ?, marked = ? WHERE id = ?", [unread, marked, id]);
+
+ }
db.execute("UPDATE articles SET modified = '' WHERE id = ?", [id]);
}
}