summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/thrift
diff options
context:
space:
mode:
authorJonathan Bauer2016-03-16 14:04:19 +0100
committerJonathan Bauer2016-03-16 14:04:19 +0100
commitf11b2ef7edcd4b76b43e615a92646d35c2d506a3 (patch)
treeccf9aa8775c3f21e7d3db258c3ff48741ec6acd0 /dozentenmodul/src/main/java/org/openslx/dozmod/thrift
parent[client] remove 'in/out' from message to the user when parsing a bad direction (diff)
downloadtutor-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.java12
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()) {