Dispatcher: Fix subtle bug with modified items being added twice to the sort index (#9628)

Discovered by @poire-z in https://github.com/koreader/koreader/pull/9531#issuecomment-1274839234
reviewable/pr9631/r1
yparitcher 2 years ago committed by GitHub
parent da65ac8b02
commit e424fcf5de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -518,7 +518,9 @@ function Dispatcher:_addToOrder(location, settings, item)
end
end
else
table.insert(location[settings].settings.order, item)
if not util.arrayContains(location[settings].settings.order, item) then
table.insert(location[settings].settings.order, item)
end
end
end
end

Loading…
Cancel
Save