Commit a14d3ea9 authored by Mygod's avatar Mygod

Fix crashing bug

parent d96cb0ea
......@@ -350,11 +350,6 @@ class Shadowsocks
super.onCreate(savedInstanceState)
// Update the profile
if (!ShadowsocksApplication.settings.getBoolean(ShadowsocksApplication.getVersionName, false)) {
currentProfile = ShadowsocksApplication.profileManager.create()
}
// Initialize the profile
currentProfile = {
ShadowsocksApplication.currentProfile getOrElse currentProfile
......
......@@ -163,10 +163,4 @@ class ProfileManager(settings: SharedPreferences, dbHelper: DBHelper) {
updateProfile(profile)
profile
}
def create(): Profile = {
val profile = loadFromPreferences
createOrUpdateProfile(profile)
profile
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment