Start new installs on the Pit Log sync server so the address is already filled in.
This commit is contained in:
1 parent
3665f7941e
commit
72eb37b991
3 files changed
+6
-2
No files matched your search
@@ -2,11 +2,13 @@ package com.racingapp.pitlog.data
|
||||
|
||||
import android.content.Context
|
||||
|
||||
const val DEFAULT_SYNC_ADDRESS = "http://sync.sleepingliongames.com:27017"
|
||||
|
||||
class SyncPreferences(context: Context) {
|
||||
private val prefs = context.getSharedPreferences("pitlog-sync", Context.MODE_PRIVATE)
|
||||
|
||||
var address: String
|
||||
get() = prefs.getString(ADDRESS, "").orEmpty()
|
||||
get() = prefs.getString(ADDRESS, DEFAULT_SYNC_ADDRESS).orEmpty()
|
||||
set(value) = prefs.edit().putString(ADDRESS, value).apply()
|
||||
|
||||
var token: String
|
||||
|
||||
Reference in new issue
Block a user