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
9fd86fe8
Commit
9fd86fe8
authored
Dec 06, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #1487
parent
6608355e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
+6
-5
No files found.
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
View file @
9fd86fe8
...
@@ -93,7 +93,7 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
...
@@ -93,7 +93,7 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
private
lateinit
var
fabProgressCircle
:
FABProgressCircle
private
lateinit
var
fabProgressCircle
:
FABProgressCircle
internal
var
crossfader
:
Crossfader
<
CrossFadeSlidingPaneLayout
>?
=
null
internal
var
crossfader
:
Crossfader
<
CrossFadeSlidingPaneLayout
>?
=
null
internal
lateinit
var
drawer
:
Drawer
internal
lateinit
var
drawer
:
Drawer
private
var
previous
Position
:
Int
=
0
// it's actually lateinit
private
var
previous
SelectedDrawer
:
Long
=
0
// it's actually lateinit
private
var
testCount
=
0
private
var
testCount
=
0
private
lateinit
var
statusText
:
TextView
private
lateinit
var
statusText
:
TextView
...
@@ -303,7 +303,7 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
...
@@ -303,7 +303,7 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
}
else
drawer
=
drawerBuilder
.
build
()
}
else
drawer
=
drawerBuilder
.
build
()
if
(
savedInstanceState
==
null
)
displayFragment
(
ProfilesFragment
())
if
(
savedInstanceState
==
null
)
displayFragment
(
ProfilesFragment
())
previous
Position
=
drawer
.
currentSelectedPosi
tion
previous
SelectedDrawer
=
drawer
.
currentSelec
tion
statusText
=
findViewById
(
R
.
id
.
status
)
statusText
=
findViewById
(
R
.
id
.
status
)
txText
=
findViewById
(
R
.
id
.
tx
)
txText
=
findViewById
(
R
.
id
.
tx
)
txRateText
=
findViewById
(
R
.
id
.
txRate
)
txRateText
=
findViewById
(
R
.
id
.
txRate
)
...
@@ -387,9 +387,10 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
...
@@ -387,9 +387,10 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
}
}
override
fun
onItemClick
(
view
:
View
?,
position
:
Int
,
drawerItem
:
IDrawerItem
<
*
,
*
>):
Boolean
{
override
fun
onItemClick
(
view
:
View
?,
position
:
Int
,
drawerItem
:
IDrawerItem
<
*
,
*
>):
Boolean
{
if
(
position
==
previousPosition
)
drawer
.
closeDrawer
()
else
{
val
id
=
drawerItem
.
identifier
previousPosition
=
position
if
(
id
==
previousSelectedDrawer
)
drawer
.
closeDrawer
()
else
{
when
(
drawerItem
.
identifier
)
{
previousSelectedDrawer
=
id
when
(
id
)
{
DRAWER_PROFILES
->
displayFragment
(
ProfilesFragment
())
DRAWER_PROFILES
->
displayFragment
(
ProfilesFragment
())
DRAWER_GLOBAL_SETTINGS
->
displayFragment
(
GlobalSettingsFragment
())
DRAWER_GLOBAL_SETTINGS
->
displayFragment
(
GlobalSettingsFragment
())
DRAWER_ABOUT
->
{
DRAWER_ABOUT
->
{
...
...
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