mirror of
https://github.com/kalarina-bit/Sparkledns.git
synced 2026-11-22 07:36:09 +00:00
Read the saved list state without a default for old versions
This commit is contained in:
@@ -360,7 +360,7 @@ private class BlocklistStore(context: Context) {
|
||||
val array = JSONArray(raw)
|
||||
(0 until array.length()).map {
|
||||
val o = array.getJSONObject(it)
|
||||
RemoteList(o.getString("url"), o.getInt("count"), o.getLong("updated"), o.optBoolean("enabled", true))
|
||||
RemoteList(o.getString("url"), o.getInt("count"), o.getLong("updated"), o.getBoolean("enabled"))
|
||||
}
|
||||
}.getOrDefault(emptyList())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user