Skip to content

Commit

Permalink
Fix realtime traffic in profile selector
Browse files Browse the repository at this point in the history
  • Loading branch information
Mygod committed Nov 23, 2015
1 parent 4686c7f commit ffdde98
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.github.shadowsocks

import android.content.Intent
import android.os.Bundle
import android.os.{Handler, Bundle}
import android.support.design.widget.Snackbar
import android.support.v7.app.{AlertDialog, AppCompatActivity}
import android.support.v7.widget.RecyclerView.ViewHolder
Expand Down Expand Up @@ -69,7 +69,7 @@ class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClickListe
builder.setSpan(new TextAppearanceSpan(ProfileManagerActivity.this, android.R.style.TextAppearance_Small),
start + 1, builder.length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
}
text.setText(builder)
handler.post(() => text.setText(builder))
}

def bind(item: Profile) {
Expand Down Expand Up @@ -129,6 +129,7 @@ class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClickListe
}

private var selectedItem: ProfileViewHolder = _
private val handler = new Handler

private lazy val profilesAdapter = new ProfilesAdapter
private var removedSnackbar: Snackbar = _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
package com.github.shadowsocks

import java.io.File
import java.lang.Process
import java.net.{Inet6Address, InetAddress}
import java.util.Locale
import java.lang.{Process, ProcessBuilder}

import android.app._
import android.content._
Expand All @@ -56,8 +56,8 @@ import android.widget.Toast
import com.github.shadowsocks.aidl.Config
import com.github.shadowsocks.utils._

import scala.collection._
import scala.collection.JavaConversions._
import scala.collection._
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
package com.github.shadowsocks

import java.io.File
import java.lang.Process
import java.util.Locale
import java.lang.{Process, ProcessBuilder}

import android.app._
import android.content._
Expand Down

0 comments on commit ffdde98

Please sign in to comment.