Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
1362e8ce
Commit
1362e8ce
authored
Jan 09, 2020
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep user configured profiles after sync
parent
3a281beb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
core/src/main/java/com/github/shadowsocks/database/ProfileManager.kt
...in/java/com/github/shadowsocks/database/ProfileManager.kt
+1
-0
mobile/src/main/java/com/github/shadowsocks/subscription/SubscriptionFragment.kt
...m/github/shadowsocks/subscription/SubscriptionFragment.kt
+9
-0
No files found.
core/src/main/java/com/github/shadowsocks/database/ProfileManager.kt
View file @
1362e8ce
...
@@ -70,6 +70,7 @@ object ProfileManager {
...
@@ -70,6 +70,7 @@ object ProfileManager {
it
.
tx
=
tx
it
.
tx
=
tx
it
.
rx
=
rx
it
.
rx
=
rx
}
}
it
.
subscription
=
Profile
.
SubscriptionStatus
.
Active
createProfile
(
it
)
createProfile
(
it
)
}
}
}
}
...
...
mobile/src/main/java/com/github/shadowsocks/subscription/SubscriptionFragment.kt
View file @
1362e8ce
...
@@ -41,6 +41,7 @@ import com.github.shadowsocks.MainActivity
...
@@ -41,6 +41,7 @@ import com.github.shadowsocks.MainActivity
import
com.github.shadowsocks.R
import
com.github.shadowsocks.R
import
com.github.shadowsocks.ToolbarFragment
import
com.github.shadowsocks.ToolbarFragment
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.bg.BaseService
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.database.ProfileManager
import
com.github.shadowsocks.database.ProfileManager
import
com.github.shadowsocks.plugin.AlertDialogFragment
import
com.github.shadowsocks.plugin.AlertDialogFragment
import
com.github.shadowsocks.utils.asIterable
import
com.github.shadowsocks.utils.asIterable
...
@@ -245,6 +246,14 @@ class SubscriptionFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener
...
@@ -245,6 +246,14 @@ class SubscriptionFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener
}
}
}
}
val
userProfiles
=
oldProfiles
?.
filter
{
it
.
subscription
==
Profile
.
SubscriptionStatus
.
UserConfigured
}
if
(
userProfiles
!=
null
)
{
for
(
profile
in
userProfiles
.
asIterable
())
{
ProfileManager
.
createProfile
(
profile
)
}
}
progress
.
post
{
progress
.
post
{
progress
.
visibility
=
View
.
INVISIBLE
progress
.
visibility
=
View
.
INVISIBLE
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment