fix: 关联文件打开会出现两个tap
This commit is contained in:
parent
d680623993
commit
0ba9794b8e
@ -56,7 +56,9 @@ public class LunchApp extends Application {
|
||||
List<String> rawParameters = getParameters().getRaw();
|
||||
threadPool.execute(() -> {
|
||||
TextArea textArea = controller.openAssociatedFileAndCreateTextArea(rawParameters);
|
||||
Platform.runLater(() -> updateUIWithNewTextArea(textArea));
|
||||
if (!Objects.isNull(textArea)) {
|
||||
Platform.runLater(() -> updateUIWithNewTextArea(textArea));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,12 +35,12 @@ public class Controller implements ControllerInterface {
|
||||
if (!rawParameters.isEmpty()) {
|
||||
String filePath = rawParameters.get(0);
|
||||
openAssociatedFile(filePath);
|
||||
return null;
|
||||
} else {
|
||||
TextArea textArea = createNewTextArea();
|
||||
configureTextArea(textArea);
|
||||
return textArea;
|
||||
}
|
||||
|
||||
TextArea textArea = createNewTextArea();
|
||||
configureTextArea(textArea);
|
||||
|
||||
return textArea;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user