android: fix dict overrides (#6887)

- User overrides marked as false were not checked
- Actions without app were skipped.
pull/6847/head
Martín Fernández 4 years ago committed by GitHub
parent dba7112390
commit 4a6f8769ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save