diff options
author | Jonathan Bauer | 2016-03-16 14:04:19 +0100 |
---|---|---|
committer | Jonathan Bauer | 2016-03-16 14:04:19 +0100 |
commit | f11b2ef7edcd4b76b43e615a92646d35c2d506a3 (patch) | |
tree | ccf9aa8775c3f21e7d3db258c3ff48741ec6acd0 /dozentenmodul/src/main/java/org/openslx/dozmod/thrift | |
parent | [client] remove 'in/out' from message to the user when parsing a bad direction (diff) | |
download | tutor-module-f11b2ef7edcd4b76b43e615a92646d35c2d506a3.tar.gz tutor-module-f11b2ef7edcd4b76b43e615a92646d35c2d506a3.tar.xz tutor-module-f11b2ef7edcd4b76b43e615a92646d35c2d506a3.zip |
[client] when NOT pressing shift and only one real satellite is returned from the masterserver, use that sat instead of asking the user
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/thrift')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/thrift/ThriftActions.java | 12 |
1 files 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()) { |