Develop 1.8 #20

Merged
Kan18 merged 242 commits from develop-1.8 into master-1.8 2019-11-10 20:52:08 -05:00
Showing only changes of commit 4a6af34d7c - Show all commits

View File

@@ -1,3 +1,4 @@
local Array = require('opus.array')
local Config = require('opus.config')
local Util = require('opus.util')
@@ -33,10 +34,22 @@ end
function Alt.set(key, value)
local config = getConfig()
Alt.addChoice(key, value)
config.default[key] = value
Config.update('alternate', config)
end
function Alt.remove(key, value)
local config = getConfig()
Array.removeByValue(config.choices[key], value)
if config.default[key] == value then
config.default[key] = config.choices[key][1]
end
Config.update('alternate', config)
end
function Alt.addChoice(key, value)
local config = getConfig()