Display machines as they are being refreshed

This commit is contained in:
Cameron Gutman
2014-11-08 13:14:35 -08:00
parent 2df2f850d5
commit 21e46a5c3b
5 changed files with 27 additions and 7 deletions

View File

@@ -110,7 +110,10 @@ public class PcView extends Activity {
public void onItemClick(AdapterView<?> arg0, View arg1, int pos,
long id) {
ComputerObject computer = (ComputerObject) pcGridAdapter.getItem(pos);
if (computer.details.reachability == ComputerDetails.Reachability.OFFLINE) {
if (computer.details.reachability == ComputerDetails.Reachability.UNKNOWN) {
// Do nothing
}
else if (computer.details.reachability == ComputerDetails.Reachability.OFFLINE) {
// Open the context menu if a PC is offline
openContextMenu(arg1);
}
@@ -235,7 +238,8 @@ public class PcView extends Activity {
AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
ComputerObject computer = (ComputerObject) pcGridAdapter.getItem(info.position);
if (computer == null || computer.details == null) {
if (computer == null || computer.details == null ||
computer.details.reachability == ComputerDetails.Reachability.UNKNOWN) {
startComputerUpdates();
return;
}