Adding starred item button

This commit is contained in:
Alvaro Rodriguez 2013-09-12 19:53:53 +02:00
parent 4b0aad9d0e
commit 1ed7b4c610
3 changed files with 26 additions and 3 deletions

View file

@ -45,6 +45,8 @@ App.prototype.after_login = function() {
_this.showFull(_this.unread_articles[i]);
} else if(url == "#unread") {
_this.setCurrentUnread();
} else if(url == "#starred") {
_this.setCurrentStarred();
} else if(url == "#logout") {
_this.logout();
} else if(url == "#reset-info") {
@ -301,6 +303,13 @@ App.prototype.setCurrentRead = function() {
this.updatePieChart();
};
App.prototype.setCurrentStarred = function() {
var article = this.unread_articles[this.currentIndex];
if(!article) return; // happens if we're not on a full article site
this.ttrss.setArticleStarred(article.id);
};
App.prototype.setCurrentUnread = function() {
var article = this.unread_articles[this.currentIndex];
article.unread = true;
@ -348,4 +357,4 @@ App.prototype.fontChange = function(size) {
}
};
};