android: fix dict overrides (#6887)
- User overrides marked as false were not checked - Actions without app were skipped.
This commit is contained in:
1 parent
dba7112390
commit
4a6f8769ae
2 files changed
+6
-11
No files matched your search
@@ -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