mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-16 21:43:33 +08:00
🗽 Sync 2026-08-09 22:41:21
This commit is contained in:
1 parent
0daa789835
commit
8d3eaa96b2
66 files changed
+4182
-3339
No files matched your search
@@ -165,23 +165,14 @@ source.validate = function(self, value, t)
|
||||
end
|
||||
|
||||
local dynamicList_write = function(self, section, value)
|
||||
local t = {}
|
||||
local t2 = {}
|
||||
local new_t = {}
|
||||
if type(value) == "table" then
|
||||
local x
|
||||
for _, x in ipairs(value) do
|
||||
if x and #x > 0 then
|
||||
if not t2[x] then
|
||||
t2[x] = x
|
||||
t[#t+1] = x
|
||||
end
|
||||
end
|
||||
end
|
||||
new_t = api.table_remove_duplicates(value)
|
||||
else
|
||||
t = { value }
|
||||
new_t = { value }
|
||||
end
|
||||
t = table.concat(t, " ")
|
||||
return DynamicList.write(self, section, t)
|
||||
local new_val = table.concat(new_t, " ")
|
||||
return DynamicList.write(self, section, new_val)
|
||||
end
|
||||
|
||||
source.write = dynamicList_write
|
||||
|
||||
Reference in new issue
Block a user