Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Imre Kristoffer Eilertsen
Nebulo
Commits
52d9d079
Commit
52d9d079
authored
Jun 05, 2021
by
Daniel Wolf
Browse files
Always re-show current server
parent
c0c4a374
Changes
1
Show whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/fragment/MainFragment.kt
View file @
52d9d079
...
...
@@ -63,7 +63,6 @@ class MainFragment : Fragment() {
private
var
proxyState
:
ProxyState
=
ProxyState
.
NOT_RUNNING
private
var
vpnStateReceiver
:
BroadcastReceiver
?
=
null
private
var
latencyCheckJob
:
Job
?
=
null
private
var
currentDisplayedServerHash
:
Int
?
=
null
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
...
...
@@ -83,9 +82,7 @@ class MainFragment : Fragment() {
if
(
proxyState
!=
previousProxyState
)
{
updateVpnIndicators
()
}
if
(
proxyState
!=
previousProxyState
||
currentDisplayedServerHash
==
null
)
{
displayServer
(
getPreferences
().
dnsServerConfig
)
}
runLatencyCheck
()
}
...
...
@@ -207,8 +204,6 @@ class MainFragment : Fragment() {
}
private
fun
displayServer
(
config
:
DnsServerInformation
<
*
>)
{
if
(
config
.
hashCode
()
==
currentDisplayedServerHash
)
return
currentDisplayedServerHash
=
config
.
hashCode
()
serverName
.
text
=
config
.
name
serverURL
.
text
=
when
(
config
.
type
)
{
ServerType
.
DOH
->
(
config
as
HttpsDnsServerInformation
).
servers
.
firstOrNull
()
?.
address
?.
getUrl
(
...
...
Write
Preview
Supports
Markdown
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