fix UI on tablet
This commit is contained in:
@@ -73,10 +73,10 @@ class Profile {
|
||||
var download: Int = 0
|
||||
|
||||
@DatabaseField
|
||||
var chnroute: Boolean = false
|
||||
var chnroute: Boolean = true
|
||||
|
||||
@DatabaseField
|
||||
var global: Boolean = false
|
||||
var global: Boolean = true
|
||||
|
||||
@DatabaseField
|
||||
var bypass: Boolean = false
|
||||
|
||||
@@ -133,7 +133,7 @@ class ProfileManager(settings: SharedPreferences, dbHelper: DBHelper) {
|
||||
profile
|
||||
}
|
||||
|
||||
def save(): Profile = {
|
||||
private def loadFromPreferences: Profile = {
|
||||
val profile = new Profile()
|
||||
|
||||
profile.id = settings.getInt(Key.profileId, -1)
|
||||
@@ -162,8 +162,18 @@ class ProfileManager(settings: SharedPreferences, dbHelper: DBHelper) {
|
||||
}
|
||||
profile.individual = settings.getString(Key.proxied, "")
|
||||
|
||||
updateProfile(profile)
|
||||
profile
|
||||
}
|
||||
|
||||
def save(): Profile = {
|
||||
val profile = loadFromPreferences
|
||||
updateProfile(profile)
|
||||
profile
|
||||
}
|
||||
|
||||
def create(): Profile = {
|
||||
val profile = loadFromPreferences
|
||||
createOrUpdateProfile(profile)
|
||||
profile
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user