Skip to content

Commit 92cadf9

Browse files
committed
Save key and log path before api key check
1 parent fbdce28 commit 92cadf9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/itzilly/shadowOverlay/ui/MainWindowController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public void initialize(URL url, ResourceBundle resourceBundle) {
5252
public void onBtnStartAction(ActionEvent actionEvent) {
5353
// Start Button
5454

55+
YmlConfig ymlConfig = new YmlConfig();
56+
ymlConfig.set("API_KEY", txtbxApiKey.getText().strip());
57+
ymlConfig.set("LOG_PATH", txtbxLogPath.getText().replace('\\', '/').strip());
58+
5559
Constants.API_KEY = txtbxApiKey.getText().strip();
5660
if (!Http.isValidKey(Constants.API_KEY)) {
5761
Alert alert = new Alert(Alert.AlertType.ERROR);
@@ -83,10 +87,6 @@ public void onBtnStartAction(ActionEvent actionEvent) {
8387
Constants.LOG_TAILER_THREAD.setDaemon(true);
8488
Constants.LOG_TAILER_THREAD.start();
8589
btnStop.setVisible(true);
86-
87-
YmlConfig ymlConfig = new YmlConfig();
88-
ymlConfig.set("API_KEY", txtbxApiKey.getText().strip());
89-
ymlConfig.set("LOG_PATH", txtbxLogPath.getText().replace('\\', '/').strip());
9090
}
9191

9292
public void onBtnStopAction(ActionEvent actionEvent) {

0 commit comments

Comments
 (0)