toggleUnread: handle local db
This commit is contained in:
parent
69ea0cdd1b
commit
1a00325836
21
viewfeed.js
21
viewfeed.js
|
@ -811,6 +811,12 @@ function toggleUnread(id, cmode, effect) {
|
||||||
} else {
|
} else {
|
||||||
row.className = nc + "Unread";
|
row.className = nc + "Unread";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (db) {
|
||||||
|
db.execute("UPDATE articles SET unread = not unread "+
|
||||||
|
"WHERE id = ?", [id]);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (cmode == 0) {
|
} else if (cmode == 0) {
|
||||||
row.className = nc;
|
row.className = nc;
|
||||||
|
|
||||||
|
@ -819,10 +825,24 @@ function toggleUnread(id, cmode, effect) {
|
||||||
afterFinish: toggleUnread_afh,
|
afterFinish: toggleUnread_afh,
|
||||||
queue: { position:'end', scope: 'TMRQ-' + id, limit: 1 } } );
|
queue: { position:'end', scope: 'TMRQ-' + id, limit: 1 } } );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (db) {
|
||||||
|
db.execute("UPDATE articles SET unread = 0 "+
|
||||||
|
"WHERE id = ?", [id]);
|
||||||
|
}
|
||||||
|
|
||||||
} else if (cmode == 1) {
|
} else if (cmode == 1) {
|
||||||
row.className = nc + "Unread";
|
row.className = nc + "Unread";
|
||||||
|
|
||||||
|
if (db) {
|
||||||
|
db.execute("UPDATE articles SET unread = 1 "+
|
||||||
|
"WHERE id = ?", [id]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_local_feedlist_counters();
|
||||||
|
|
||||||
// Disable unmarking as selected for the time being (16.05.08) -fox
|
// Disable unmarking as selected for the time being (16.05.08) -fox
|
||||||
if (is_selected) row.className = row.className + "Selected";
|
if (is_selected) row.className = row.className + "Selected";
|
||||||
|
|
||||||
|
@ -840,7 +860,6 @@ function toggleUnread(id, cmode, effect) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("toggleUnread", e);
|
exception_error("toggleUnread", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue