From 5cd9494ae96608356c6243ae62592eaf47b0203a Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Fri, 10 Jan 2025 09:48:25 +0200 Subject: [PATCH] Annotations: fix matchFunc (#13037) Compare only datetime and start/end positions, it's enough. Closes #13030. --- frontend/apps/reader/modules/readerannotation.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/apps/reader/modules/readerannotation.lua b/frontend/apps/reader/modules/readerannotation.lua index a67837170..ce44e35b5 100644 --- a/frontend/apps/reader/modules/readerannotation.lua +++ b/frontend/apps/reader/modules/readerannotation.lua @@ -350,8 +350,7 @@ function ReaderAnnotation:getMatchFunc() if self.ui.rolling then doesMatch = function(a, b) if (a.datetime ~= nil and b.datetime ~= nil and a.datetime ~= b.datetime) - or (not a.drawer) ~= (not b.drawer) - or a.page ~= b.page + or a.pos0 ~= b.pos0 or a.pos1 ~= b.pos1 then return false end @@ -360,7 +359,6 @@ function ReaderAnnotation:getMatchFunc() else doesMatch = function(a, b) if (a.datetime ~= nil and b.datetime ~= nil and a.datetime ~= b.datetime) - or (not a.drawer) ~= (not b.drawer) or a.page ~= b.page or (a.pos0 and (a.pos0.x ~= b.pos0.x or a.pos1.x ~= b.pos1.x or a.pos0.y ~= b.pos0.y or a.pos1.y ~= b.pos1.y)) then