Fix comic reader arrow visiblilty for one paged comic files

Changed logging during kobo sync
This commit is contained in:
Ozzie Isaacs 2023-10-28 07:50:01 +02:00
parent 3d07efbb4f
commit c550d6c90d
2 changed files with 9 additions and 12 deletions

View File

@ -315,7 +315,7 @@ def generate_sync_response(sync_token, sync_results, set_cont=False):
extra_headers["x-kobo-recent-reads"] = store_response.headers.get("x-kobo-recent-reads") extra_headers["x-kobo-recent-reads"] = store_response.headers.get("x-kobo-recent-reads")
except Exception as ex: except Exception as ex:
log.error("Failed to receive or parse response from Kobo's sync endpoint: {}".format(ex)) log.error_or_exception("Failed to receive or parse response from Kobo's sync endpoint: {}".format(ex))
if set_cont: if set_cont:
extra_headers["x-kobo-sync"] = "continue" extra_headers["x-kobo-sync"] = "continue"
sync_token.to_headers(extra_headers) sync_token.to_headers(extra_headers)

View File

@ -179,26 +179,23 @@ kthoom.ImageFile = function(file) {
}; };
function updateDirectionButtons(){ function updateDirectionButtons(){
$("#right").show(); var left, right = 1;
$("#left").show();
if (currentImage == 0 ) { if (currentImage == 0 ) {
if (settings.direction === 0) { if (settings.direction === 0) {
$("#right").show(); left = 0;
$("#left").hide();
} else { } else {
$("#left").show(); right = 0;
$("#right").hide();
} }
} }
if ((currentImage + 1) >= Math.max(totalImages, imageFiles.length)) { if ((currentImage + 1) >= Math.max(totalImages, imageFiles.length)) {
if (settings.direction === 0) { if (settings.direction === 0) {
$("#left").show(); right = 0;
$("#right").hide();
} else { } else {
$("#right").show(); left = 0;
$("#left").hide();
} }
} }
left === 1 ? $("#left").show() : $("#left").hide();
right === 1 ? $("#right").show() : $("#right").hide();
} }
function initProgressClick() { function initProgressClick() {
$("#progress").click(function(e) { $("#progress").click(function(e) {