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
ca386a75
Commit
ca386a75
authored
Jul 29, 2018
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix styling
parent
ec340cf0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
.../src/main/java/com/github/shadowsocks/ProfilesFragment.kt
+0
-1
mobile/src/main/java/com/github/shadowsocks/database/Profile.kt
.../src/main/java/com/github/shadowsocks/database/Profile.kt
+2
-3
No files found.
mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
View file @
ca386a75
...
@@ -57,7 +57,6 @@ import com.google.android.gms.ads.AdSize
...
@@ -57,7 +57,6 @@ import com.google.android.gms.ads.AdSize
import
com.google.android.gms.ads.AdView
import
com.google.android.gms.ads.AdView
import
net.glxn.qrgen.android.QRCode
import
net.glxn.qrgen.android.QRCode
import
org.json.JSONArray
import
org.json.JSONArray
import
java.io.IOException
class
ProfilesFragment
:
ToolbarFragment
(),
Toolbar
.
OnMenuItemClickListener
{
class
ProfilesFragment
:
ToolbarFragment
(),
Toolbar
.
OnMenuItemClickListener
{
companion
object
{
companion
object
{
...
...
mobile/src/main/java/com/github/shadowsocks/database/Profile.kt
View file @
ca386a75
...
@@ -38,7 +38,6 @@ import java.io.Serializable
...
@@ -38,7 +38,6 @@ import java.io.Serializable
import
java.net.URI
import
java.net.URI
import
java.net.URISyntaxException
import
java.net.URISyntaxException
import
java.util.*
import
java.util.*
import
kotlin.collections.ArrayList
@Entity
@Entity
class
Profile
:
Serializable
{
class
Profile
:
Serializable
{
...
@@ -146,7 +145,7 @@ class Profile : Serializable {
...
@@ -146,7 +145,7 @@ class Profile : Serializable {
}
}
}
}
}
}
fun
parseJson
(
json
:
String
,
feature
:
Profile
?
=
null
)
:
List
<
Profile
>
=
fun
parseJson
(
json
:
String
,
feature
:
Profile
?
=
null
):
List
<
Profile
>
=
JsonParser
(
feature
).
apply
{
process
(
JSONTokener
(
json
).
nextValue
())
}
JsonParser
(
feature
).
apply
{
process
(
JSONTokener
(
json
).
nextValue
())
}
}
}
...
@@ -198,7 +197,7 @@ class Profile : Serializable {
...
@@ -198,7 +197,7 @@ class Profile : Serializable {
val
formattedAddress
get
()
=
(
if
(
host
.
contains
(
":"
))
"[%s]:%d"
else
"%s:%d"
).
format
(
host
,
remotePort
)
val
formattedAddress
get
()
=
(
if
(
host
.
contains
(
":"
))
"[%s]:%d"
else
"%s:%d"
).
format
(
host
,
remotePort
)
val
formattedName
get
()
=
if
(
name
.
isNullOrEmpty
())
formattedAddress
else
name
!!
val
formattedName
get
()
=
if
(
name
.
isNullOrEmpty
())
formattedAddress
else
name
!!
fun
copyFeatureSettingsTo
(
profile
:
Profile
)
{
fun
copyFeatureSettingsTo
(
profile
:
Profile
)
{
profile
.
route
=
route
profile
.
route
=
route
profile
.
ipv6
=
ipv6
profile
.
ipv6
=
ipv6
...
...
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