From cffd9d1eb4dc5189ce19d2f81528b828938d1a12 Mon Sep 17 00:00:00 2001 From: Mygod Date: Fri, 23 Mar 2018 01:57:04 -0700 Subject: [PATCH] Fix usage stats not saved --- .../main/java/com/github/shadowsocks/ProfileConfigFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt b/mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt index 9e8d3e58..c7dcdd2e 100644 --- a/mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt +++ b/mobile/src/main/java/com/github/shadowsocks/ProfileConfigFragment.kt @@ -124,7 +124,7 @@ class ProfileConfigFragment : PreferenceFragmentCompatDividers(), Toolbar.OnMenu } fun saveAndExit() { - val profile = Profile() + val profile = ProfileManager.getProfile(profileId) ?: Profile() profile.id = profileId profile.deserialize() ProfileManager.updateProfile(profile)