Commit a7425128 authored by Mygod's avatar Mygod

Fix customRules not saved

parent 8b0c8168
......@@ -50,13 +50,15 @@ class Acl {
var customRules: Acl
get() {
val acl = Acl()
val str = DataStore.publicStore.getString(CUSTOM_RULES) ?: return acl
val str = DataStore.publicStore.getString(CUSTOM_RULES)
if (str != null) {
acl.fromReader(str.reader())
if (!acl.bypass) {
acl.subnets.clear()
acl.hostnames.clear()
acl.bypass = true
}
} else acl.bypass = true
return acl
}
set(value) = DataStore.publicStore.putString(CUSTOM_RULES, if ((!value.bypass ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment