Commit 1de3a449 authored by Max Lv's avatar Max Lv

Merge pull request #455 from Mygod/master

Fix recycling in ProfileManagerActivity
parents 2127e17c b1128047
......@@ -78,6 +78,9 @@ class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClickListe
if (item.id == ShadowsocksApplication.profileId) {
text.setChecked(true)
selectedItem = this
} else {
text.setChecked(false)
if (selectedItem eq this) selectedItem = null
}
}
......@@ -169,9 +172,8 @@ class ProfileManagerActivity extends AppCompatActivity with OnMenuItemClickListe
attachService(new IShadowsocksServiceCallback.Stub {
def stateChanged(state: Int, msg: String) = () // ignore
def trafficUpdated(txRate: String, rxRate: String, txTotal: String, rxTotal: String) {
def trafficUpdated(txRate: String, rxRate: String, txTotal: String, rxTotal: String) =
if (selectedItem != null) selectedItem.updateText(true)
}
})
}
......
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