mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 22:31:16 +00:00
Set announce color green if at least one is connected (fixes #249)
This commit is contained in:
parent
b7459c9ded
commit
c3e4ff4cb1
1 changed files with 3 additions and 4 deletions
|
@ -182,12 +182,11 @@ public class DrawerFragment extends Fragment implements RestApi.OnReceiveSystemI
|
|||
});
|
||||
mCpuUsage.setText(new DecimalFormat("0.00").format(info.cpuPercent) + "%");
|
||||
mRamUsage.setText(RestApi.readableFileSize(mActivity, info.sys));
|
||||
if (info.extAnnounceConnected == info.extAnnounceTotal) {
|
||||
mAnnounceServer.setText(android.R.string.ok);
|
||||
mAnnounceServer.setText(Integer.toString(info.extAnnounceConnected) + "/" +
|
||||
Integer.toString(info.extAnnounceTotal));
|
||||
if (info.extAnnounceConnected > 0) {
|
||||
mAnnounceServer.setTextColor(getResources().getColor(R.color.text_green));
|
||||
} else {
|
||||
mAnnounceServer.setText(Integer.toString(info.extAnnounceConnected) + "/" +
|
||||
Integer.toString(info.extAnnounceTotal));
|
||||
mAnnounceServer.setTextColor(getResources().getColor(R.color.text_red));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue