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
fbeb11a2
Commit
fbeb11a2
authored
Feb 04, 2020
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine code style
parent
10ed65c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
core/src/main/java/com/github/shadowsocks/plugin/PluginConfiguration.kt
...java/com/github/shadowsocks/plugin/PluginConfiguration.kt
+2
-1
mobile/src/main/java/com/github/shadowsocks/preference/PluginPreference.kt
...ava/com/github/shadowsocks/preference/PluginPreference.kt
+2
-3
No files found.
core/src/main/java/com/github/shadowsocks/plugin/PluginConfiguration.kt
View file @
fbeb11a2
...
...
@@ -50,8 +50,9 @@ class PluginConfiguration(val pluginsOptions: Map<String, PluginOptions>, val se
}
else
PluginOptions
(
line
)
})
fun
getOptions
(
id
:
String
):
PluginOptions
=
if
(
id
.
isEmpty
())
PluginOptions
()
else
fun
getOptions
(
id
:
String
):
PluginOptions
=
if
(
id
.
isEmpty
())
PluginOptions
()
else
{
pluginsOptions
[
id
]
?:
PluginOptions
(
id
,
PluginManager
.
fetchPlugins
().
lookup
[
id
]
?.
defaultConfig
)
}
val
selectedOptions
:
PluginOptions
get
()
=
getOptions
(
selected
)
override
fun
toString
():
String
{
...
...
mobile/src/main/java/com/github/shadowsocks/preference/PluginPreference.kt
View file @
fbeb11a2
...
...
@@ -30,9 +30,8 @@ import com.github.shadowsocks.plugin.PluginManager
class
PluginPreference
(
context
:
Context
,
attrs
:
AttributeSet
?
=
null
)
:
ListPreference
(
context
,
attrs
)
{
companion
object
FallbackProvider
:
SummaryProvider
<
PluginPreference
>
{
override
fun
provideSummary
(
preference
:
PluginPreference
):
CharSequence
?
{
return
preference
.
selectedEntry
?.
label
?:
preference
.
unknownValueSummary
.
format
(
preference
.
value
)
}
override
fun
provideSummary
(
preference
:
PluginPreference
)
=
preference
.
selectedEntry
?.
label
?:
preference
.
unknownValueSummary
.
format
(
preference
.
value
)
}
lateinit
var
plugins
:
PluginList
...
...
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