mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 10:11:27 +00:00
cleaned up code
This commit is contained in:
@@ -97,7 +97,6 @@ public class ErrorController implements FxController {
|
||||
@FXML
|
||||
public void showSolution() {
|
||||
if(matchingErrorDiscussion != null){
|
||||
//TODO: errorDiscussion.url or errorDiscussion.answer.url
|
||||
application.getHostServices().showDocument(matchingErrorDiscussion.url);
|
||||
}
|
||||
}
|
||||
@@ -139,7 +138,6 @@ public class ErrorController implements FxController {
|
||||
new TypeToken<Map<String,ErrorDiscussion>>(){}.getType());
|
||||
|
||||
if(!map.values().stream().filter(this::isPartialMatchFilter).findFirst().isEmpty()) {
|
||||
lookUpSolutionVisibility.set(true);
|
||||
Comparator<ErrorDiscussion> comp = this::compareExactMatch;
|
||||
matchingErrorDiscussion = map.values().stream().sorted(comp
|
||||
.thenComparing(this::compareSecondLevelMatch)
|
||||
@@ -147,6 +145,7 @@ public class ErrorController implements FxController {
|
||||
.thenComparing(this::compareIsAnswered)
|
||||
.thenComparing(this::compareUpvoteCount)
|
||||
).findFirst().get();
|
||||
lookUpSolutionVisibility.set(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ public class ErrorDiscussion {
|
||||
String url;
|
||||
Answer answer;
|
||||
|
||||
|
||||
static class Answer{
|
||||
private String url;
|
||||
private int upvoteCount;
|
||||
|
||||
@@ -9,7 +9,6 @@ import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import javafx.application.Application;
|
||||
|
||||
Reference in New Issue
Block a user