mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Annotations: fix matchFunc (#13037)
Some checks failed
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (10.15, 13, x86-64, 15.2) (push) Has been cancelled
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (11.0, 14, ARM64, 15.4) (push) Has been cancelled
Some checks failed
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (10.15, 13, x86-64, 15.2) (push) Has been cancelled
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (11.0, 14, ARM64, 15.4) (push) Has been cancelled
Compare only datetime and start/end positions, it's enough. Closes #13030.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user