Skip to content

Commit 12ead9d

Browse files
committed
Fix bug with displayed window when running tests
1 parent edc60ca commit 12ead9d

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

tmc-plugin/src/fi/helsinki/cs/tmc/ui/TestResultWindow.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,22 @@ public void showResults(final Exercise exercise,
136136
}
137137

138138
if (submittable) {
139+
if (exercise.hasDeadlinePassed()) {
140+
dialogDisplayer.displayMessage("All tests passed, but exercise's deadline has expired.");
141+
} else {
142+
dialogDisplayer.askYesNo("All tests passed. Submit to server?", "Submit?", new Function<Boolean, Void>() {
139143

140-
dialogDisplayer.askYesNo("All tests passed. Submit to server?", "Submit?", new Function<Boolean, Void>() {
144+
@Override
145+
public Void apply(final Boolean yes) {
141146

142-
@Override
143-
public Void apply(final Boolean yes) {
147+
if (yes) {
148+
submissionCallback.run();
149+
}
144150

145-
if (yes) {
146-
submissionCallback.run();
151+
return null;
147152
}
148-
149-
return null;
150-
}
151-
});
152-
} else if (exercise.hasDeadlinePassed()) {
153-
dialogDisplayer.displayMessage("All tests passed, but exercise's deadline has expired.");
153+
});
154+
}
154155
}
155156
}
156157

0 commit comments

Comments
 (0)