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
436119e0
Commit
436119e0
authored
Dec 18, 2016
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable profile switching when connected
parent
e8ff469e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
build.sbt
build.sbt
+4
-1
src/main/scala/com/github/shadowsocks/ProfilesFragment.scala
src/main/scala/com/github/shadowsocks/ProfilesFragment.scala
+7
-5
No files found.
build.sbt
View file @
436119e0
...
@@ -42,12 +42,15 @@ libraryDependencies ++=
...
@@ -42,12 +42,15 @@ libraryDependencies ++=
"com.google.android.gms"
%
"play-services-analytics"
%
"10.0.1"
::
"com.google.android.gms"
%
"play-services-analytics"
%
"10.0.1"
::
"com.google.android.gms"
%
"play-services-gcm"
%
"10.0.1"
::
"com.google.android.gms"
%
"play-services-gcm"
%
"10.0.1"
::
"com.j256.ormlite"
%
"ormlite-android"
%
"5.0"
::
"com.j256.ormlite"
%
"ormlite-android"
%
"5.0"
::
"com.mikepenz"
%
"materialdrawer"
%
"5.8.1"
::
"com.twofortyfouram"
%
"android-plugin-api-for-locale"
%
"1.0.2"
::
"com.twofortyfouram"
%
"android-plugin-api-for-locale"
%
"1.0.2"
::
"dnsjava"
%
"dnsjava"
%
"2.1.7"
::
"dnsjava"
%
"dnsjava"
%
"2.1.7"
::
"eu.chainfire"
%
"libsuperuser"
%
"1.0.0.201608240809"
::
"eu.chainfire"
%
"libsuperuser"
%
"1.0.0.201608240809"
::
"me.dm7.barcodescanner"
%
"zxing"
%
"1.9"
::
"me.dm7.barcodescanner"
%
"zxing"
%
"1.9"
::
"net.glxn.qrgen"
%
"android"
%
"2.0"
::
"net.glxn.qrgen"
%
"android"
%
"2.0"
::
"com.mikepenz"
%
"materialdrawer"
%
"5.8.1"
::
"com.mikepenz"
%
"materialize"
%
"1.0.0"
::
"com.mikepenz"
%
"iconics-core"
%
"2.8.0"
::
"com.mikepenz"
%
"fastadapter"
%
"2.1.0"
::
Nil
Nil
lazy
val
nativeBuild
=
TaskKey
[
Unit
](
"native-build"
,
"Build native executables"
)
lazy
val
nativeBuild
=
TaskKey
[
Unit
](
"native-build"
,
"Build native executables"
)
...
...
src/main/scala/com/github/shadowsocks/ProfilesFragment.scala
View file @
436119e0
...
@@ -33,7 +33,7 @@ import android.view._
...
@@ -33,7 +33,7 @@ import android.view._
import
android.widget.
{
TextView
,
Toast
}
import
android.widget.
{
TextView
,
Toast
}
import
com.github.shadowsocks.ShadowsocksApplication.app
import
com.github.shadowsocks.ShadowsocksApplication.app
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.database.Profile
import
com.github.shadowsocks.utils.
{
Action
,
Parser
,
TrafficMonitor
,
Utils
}
import
com.github.shadowsocks.utils.
_
import
com.github.shadowsocks.widget.UndoSnackbarManager
import
com.github.shadowsocks.widget.UndoSnackbarManager
import
scala.collection.mutable.ArrayBuffer
import
scala.collection.mutable.ArrayBuffer
...
@@ -92,10 +92,12 @@ final class ProfilesFragment extends ToolbarFragment with OnMenuItemClickListene
...
@@ -92,10 +92,12 @@ final class ProfilesFragment extends ToolbarFragment with OnMenuItemClickListene
}
}
def
onClick
(
v
:
View
)
{
def
onClick
(
v
:
View
)
{
val
old
=
app
.
profileId
if
(
getActivity
.
asInstanceOf
[
MainActivity
].
state
==
State
.
STOPPED
)
{
app
.
switchProfile
(
item
.
id
)
val
old
=
app
.
profileId
profilesAdapter
.
refreshId
(
old
)
app
.
switchProfile
(
item
.
id
)
bind
(
item
)
profilesAdapter
.
refreshId
(
old
)
bind
(
item
)
}
}
}
}
}
...
...
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