From 424fa9b6fd37ac09de80ff9ebbc96c33ed0da1d7 Mon Sep 17 00:00:00 2001 From: hugleo Date: Sun, 17 Mar 2024 08:13:04 -0300 Subject: [PATCH] ReaderView: ensure that the pan zoom direction is not nil (#11557) Fix gif and web files not opening: https://github.com/koreader/koreader/pull/11425#issuecomment-2002164851 --- frontend/apps/reader/modules/readerview.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerview.lua b/frontend/apps/reader/modules/readerview.lua index 4e872edd2..7c8279434 100644 --- a/frontend/apps/reader/modules/readerview.lua +++ b/frontend/apps/reader/modules/readerview.lua @@ -695,7 +695,8 @@ function ReaderView:recalculate() -- start from right of page_area self.visible_area.x = self.page_area.x + self.page_area.w - self.visible_area.w end - if self.document.configurable.zoom_direction >= 2 and self.document.configurable.zoom_direction <= 5 then -- zoom_bottom_to_top + -- Check if we are in zoom_bottom_to_top + if self.document.configurable.zoom_direction and self.document.configurable.zoom_direction >= 2 and self.document.configurable.zoom_direction <= 5 then -- starts from bottom of page_area self.visible_area.y = self.page_area.y + self.page_area.h - self.visible_area.h else