app: Standard-Server https://byteclaw.jodabreit-ai.de; README
This commit is contained in:
parent
126f4be2b9
commit
161bc02bb9
2 changed files with 9 additions and 5 deletions
|
|
@ -20,7 +20,7 @@ class SettingsStore(context: Context) {
|
|||
)
|
||||
|
||||
fun load() = ServerSettings(
|
||||
serverUrl = prefs.getString(KEY_URL, "") ?: "",
|
||||
serverUrl = prefs.getString(KEY_URL, null)?.takeIf { it.isNotBlank() } ?: DEFAULT_SERVER_URL,
|
||||
token = prefs.getString(KEY_TOKEN, "") ?: "",
|
||||
username = prefs.getString(KEY_USER, "") ?: "",
|
||||
)
|
||||
|
|
@ -30,9 +30,11 @@ class SettingsStore(context: Context) {
|
|||
.putString(KEY_USER, s.username.trim()).apply()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val KEY_URL = "server_url"
|
||||
const val KEY_TOKEN = "token"
|
||||
const val KEY_USER = "username"
|
||||
companion object {
|
||||
/** Public ByteClaw server, prefilled on the login screen (user can change it). */
|
||||
const val DEFAULT_SERVER_URL = "https://byteclaw.jodabreit-ai.de"
|
||||
private const val KEY_URL = "server_url"
|
||||
private const val KEY_TOKEN = "token"
|
||||
private const val KEY_USER = "username"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue