secret
Last active

hell

  • Download Gist
hell.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
markAsRead: function(link) {
if ( this.unreadPosts.indexOf(link) != -1 )
this.unreadPosts.remove(link);
this.db.transaction(function(tx) {
tx.executeSql(
'UPDATE posts SET is_read = 1 WHERE link = ? AND feed_id = ?',
[link, this.id],
function(tx, res) {
this.posts.forEach(function(post) { if ( post.link == link ) post.is_read = true; });
feedreader.setCount();
}.bind(this), sqlError
);
}.bind(this));
},

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.