• R/O
  • HTTP
  • SSH
  • HTTPS

DelesteRandomSelector: Commit

開発Git


Commit MetaInfo

Revisione7000d138f2ce2415c26721ded90a9e1f8a54c32 (tree)
Time2021-10-24 10:51:39
Authorhizumiaoba <56146205+hizumiaoba@user...>
Commiterhizumiaoba

Log Message

Merge branch 'hotfix/unusedValFix'

Change Summary

Incremental Difference

--- a/src/com/ranfa/main/DelesteRandomSelector.java
+++ b/src/com/ranfa/main/DelesteRandomSelector.java
@@ -67,6 +67,7 @@ public class DelesteRandomSelector extends JFrame {
6767 private boolean integratorBool = false;
6868 private JTextArea textArea;
6969 private JScrollPane scrollPane;
70+ private CompletableFuture<Void> softwareUpdateFuture = null;
7071
7172 /**
7273 * Launch the application.
@@ -125,7 +126,7 @@ public class DelesteRandomSelector extends JFrame {
125126 + "\nSaveScoreLog: " + property.isSaveScoreLog()
126127 + "\nOutputDebugSentences: " + property.isOutputDebugSentences());
127128 if(property.isCheckVersion()) {
128- CompletableFuture<Void> softwareUpdateFuture = CompletableFuture.runAsync(() -> CheckVersion.needToBeUpdated(), es);
129+ softwareUpdateFuture = CompletableFuture.runAsync(() -> CheckVersion.needToBeUpdated(), es);
129130 }
130131 BiConsumer<ArrayList<Song>, ArrayList<Song>> updateConsumer = (list1, list2) -> {
131132 LimitedLog.println(this.getClass() + ":[INFO]: " + "Checking database updates...");
@@ -356,8 +357,12 @@ public class DelesteRandomSelector extends JFrame {
356357 btnExit = new JButton("終了");
357358 btnExit.addActionListener(new ActionListener() {
358359 public void actionPerformed(ActionEvent e) {
359- LimitedLog.println(this.getClass() + ":[INFO]: " +"Requested Exit by Button");
360- System.exit(0);
360+ if(softwareUpdateFuture.isDone()) {
361+ LimitedLog.println(this.getClass() + ":[INFO]: " +"Requested Exit by Button");
362+ System.exit(0);
363+ } else {
364+ JOptionPane.showMessageDialog(null, "内部更新処理が完了していません。少し待ってからやり直してください。");
365+ }
361366 }
362367 });
363368 btnExit.setFont(new Font("UD デジタル 教科書体 NP-B", Font.BOLD, 13));
Show on old repository browser