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
06da1726
Commit
06da1726
authored
Jul 12, 2018
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat
parent
02268a07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
+6
-7
No files found.
mobile/src/main/java/com/github/shadowsocks/MainActivity.kt
View file @
06da1726
...
@@ -58,6 +58,7 @@ import com.github.shadowsocks.preference.DataStore
...
@@ -58,6 +58,7 @@ import com.github.shadowsocks.preference.DataStore
import
com.github.shadowsocks.preference.OnPreferenceDataStoreChangeListener
import
com.github.shadowsocks.preference.OnPreferenceDataStoreChangeListener
import
com.github.shadowsocks.utils.Key
import
com.github.shadowsocks.utils.Key
import
com.github.shadowsocks.utils.responseLength
import
com.github.shadowsocks.utils.responseLength
import
com.github.shadowsocks.utils.systemService
import
com.github.shadowsocks.utils.thread
import
com.github.shadowsocks.utils.thread
import
com.github.shadowsocks.widget.ServiceButton
import
com.github.shadowsocks.widget.ServiceButton
import
com.mikepenz.materialdrawer.Drawer
import
com.mikepenz.materialdrawer.Drawer
...
@@ -335,13 +336,11 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
...
@@ -335,13 +336,11 @@ class MainActivity : AppCompatActivity(), ShadowsocksConnection.Interface, Drawe
}
}
Key
.
nightMode
->
{
Key
.
nightMode
->
{
val
mode
=
DataStore
.
nightMode
val
mode
=
DataStore
.
nightMode
if
(
mode
==
AppCompatDelegate
.
getDefaultNightMode
())
return
AppCompatDelegate
.
setDefaultNightMode
(
when
(
mode
)
{
if
(
mode
==
AppCompatDelegate
.
MODE_NIGHT_FOLLOW_SYSTEM
)
{
AppCompatDelegate
.
getDefaultNightMode
()
->
return
val
uiModeManager
=
getSystemService
(
Context
.
UI_MODE_SERVICE
)
as
UiModeManager
AppCompatDelegate
.
MODE_NIGHT_FOLLOW_SYSTEM
->
systemService
<
UiModeManager
>().
nightMode
AppCompatDelegate
.
setDefaultNightMode
(
uiModeManager
.
nightMode
)
else
->
mode
}
else
{
})
AppCompatDelegate
.
setDefaultNightMode
(
mode
)
}
recreate
()
recreate
()
}
}
}
}
...
...
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