Show the discovery in progress view if no computers remain after one is deleted

This commit is contained in:
Cameron Gutman 2015-02-27 18:05:02 -05:00
parent 0dad2dc64b
commit 067be54715

View File

@ -517,6 +517,12 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
if (details.equals(computer.details)) { if (details.equals(computer.details)) {
pcGridAdapter.removeComputer(computer); pcGridAdapter.removeComputer(computer);
pcGridAdapter.notifyDataSetChanged(); pcGridAdapter.notifyDataSetChanged();
if (pcGridAdapter.getCount() == 0) {
// Show the "Discovery in progress" view
noPcFoundLayout.setVisibility(View.VISIBLE);
}
break; break;
} }
} }