mirror of
https://github.com/yggdrasil-network/yggdrasil-android.git
synced 2025-04-28 14:15:08 +03:00
Settings screen, display fixes
This commit is contained in:
parent
8f3ee30e74
commit
fa9532fb97
7 changed files with 354 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
package eu.neilalexander.yggdrasil
|
||||
|
||||
import android.content.Context
|
||||
import android.provider.Settings
|
||||
import mobile.Mobile
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
|
@ -21,6 +22,12 @@ object ConfigurationProxy {
|
|||
return this
|
||||
}
|
||||
|
||||
fun resetJSON() {
|
||||
val conf = Mobile.generateConfigJSON()
|
||||
file.writeBytes(conf)
|
||||
fix()
|
||||
}
|
||||
|
||||
fun updateJSON(fn: (JSONObject) -> Unit) {
|
||||
json = JSONObject(file.readText(Charsets.UTF_8))
|
||||
fn(json)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue