From f11b2ef7edcd4b76b43e615a92646d35c2d506a3 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Wed, 16 Mar 2016 14:04:19 +0100 Subject: [client] when NOT pressing shift and only one real satellite is returned from the masterserver, use that sat instead of asking the user --- .../main/java/org/openslx/dozmod/thrift/ThriftActions.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java index 7caec6c0..36486b8a 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java @@ -123,9 +123,15 @@ public class ThriftActions { } } } - sat = SatelliteListWindow.open(window, data.satellites); - if (sat == null) - return false; + // after removing the test sats, check if we have only one left and directly use that + // instead of asking the user + if (data.satellites.size() != 1) { + sat = SatelliteListWindow.open(window, data.satellites); + if (sat == null) + return false; + } else { + sat = data.satellites.get(0); + } } if (sat.addressList == null || sat.addressList.isEmpty()) { -- cgit v1.2.3-55-g7522