1
0
Fork 0
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:
Lode Hoste 2015-03-17 22:35:51 +01:00
parent b7459c9ded
commit c3e4ff4cb1

View file

@ -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));
}
}