mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
android: fix dict overrides (#6887)
- User overrides marked as false were not checked - Actions without app were skipped.
This commit is contained in:
@@ -102,7 +102,7 @@ local Device = Generic:new{
|
||||
doExternalDictLookup = function (self, text, method, callback)
|
||||
external.when_back_callback = callback
|
||||
local _, app, action = external:checkMethod("dict", method)
|
||||
if app and action then
|
||||
if action then
|
||||
android.dictLookup(text, app, action)
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -25,16 +25,11 @@ function M:new(o)
|
||||
if ok then
|
||||
o[role.."s"] = user_dicts
|
||||
o.is_user_list = true
|
||||
else
|
||||
local t = o[role.."s"]
|
||||
for i, value in ipairs(t or {}) do
|
||||
local app = value[4]
|
||||
if o:check(app) then
|
||||
value[3] = true
|
||||
end
|
||||
end
|
||||
if t then
|
||||
self[role.."s"] = t
|
||||
end
|
||||
for i, value in ipairs(o[role.."s"] or {}) do
|
||||
local app = value[4]
|
||||
if app and o:check(app) then
|
||||
value[3] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user