We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3f0fa6 commit 6c381b0Copy full SHA for 6c381b0
src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala
@@ -207,7 +207,22 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan
207
}
208
209
def refreshProfile() {
210
- profile = app.currentProfile.get
+ val profile = app.currentProfile match {
211
+ case Some(profile) => profile
212
+ case None => {
213
+ app.profileManager.getFirstProfile match {
214
+ case Some(profile) => {
215
+ app.profileId(profile.id)
216
+ profile
217
+ }
218
219
+ val default = app.profileManager.createDefault()
220
+ app.profileId(default.id)
221
+ default
222
223
224
225
226
isProxyApps.setChecked(profile.proxyApps)
227
228
0 commit comments