better read colors, more fixes

This commit is contained in:
jeena 2013-08-28 17:30:08 +02:00
parent c33cfe1ed6
commit 33add515d3
4 changed files with 38 additions and 10 deletions

View file

@ -7,11 +7,6 @@ function App() {
if(!color) color = "red";
this.setColor(color);
var request = window.navigator.mozApps.getSelf();
request.onsuccess = function() {
$("#version").innerHTML = request.result.manifest.version;
}
};
App.prototype.authenticate = function() {
@ -20,6 +15,11 @@ App.prototype.authenticate = function() {
App.prototype.after_login = function() {
var request = window.navigator.mozApps.getSelf();
request.onsuccess = function() {
$("#version").innerHTML = request.result.manifest.version;
}
var _this = this;
window.onhashchange = function(e) {
@ -31,6 +31,7 @@ App.prototype.after_login = function() {
var url = window.location.hash;
if(url == "#list") {
_this.setCurrentRead();
_this.changeToPage("#list");
} else if(url == "#reload") {
_this.reload();
@ -68,7 +69,9 @@ App.prototype.after_login = function() {
$(".info.swipe").addClass("hidden");
};
if(localStorage.info_swipe) {
var supportsTouch = 'ontouchend' in document;
if(!supportsTouch || localStorage.info_swipe) {
$(".info.swipe").addClass("hidden");
}
@ -271,14 +274,18 @@ App.prototype.showPrevious = function() {
App.prototype.setCurrentRead = function() {
var article = this.unread_articles[this.currentIndex];
if(!article) return; // happens if we're not on a full article site
if(!article.set_unread) {
article.unread = false;
this.updateList();
var _this = this;
setTimeout(function() { _this.ttrss.setArticleRead(article.id); },100);
setTimeout(function() { _this.ttrss.setArticleRead(article.id); }, 100);
}
article.set_unread = false;
this.updatePieChart();
};
App.prototype.setCurrentUnread = function() {