Commit 010fd615 authored by Mygod's avatar Mygod

Fix profile name display in notification

parent 8b57b537
...@@ -124,8 +124,6 @@ trait BaseService extends Service { ...@@ -124,8 +124,6 @@ trait BaseService extends Service {
} }
def connect() { def connect() {
profile.name = profile.getName // save original name before it's (possibly) overwritten by IP addresses
if (profile.host == "198.199.101.152") { if (profile.host == "198.199.101.152") {
val client = new OkHttpClient.Builder() val client = new OkHttpClient.Builder()
.dns(hostname => Utils.resolve(hostname, enableIPv6 = false) match { .dns(hostname => Utils.resolve(hostname, enableIPv6 = false) match {
...@@ -256,6 +254,8 @@ trait BaseService extends Service { ...@@ -256,6 +254,8 @@ trait BaseService extends Service {
case _ => return Service.START_NOT_STICKY // ignore request case _ => return Service.START_NOT_STICKY // ignore request
} }
profile = app.currentProfile.orNull profile = app.currentProfile.orNull
profile.name = profile.getName // save original name before it's (possibly) overwritten by IP addresses
TrafficMonitor.reset() TrafficMonitor.reset()
trafficMonitorThread = new TrafficMonitorThread(getApplicationContext) trafficMonitorThread = new TrafficMonitorThread(getApplicationContext)
trafficMonitorThread.start() trafficMonitorThread.start()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment