mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-04-19 13:06:30 +02:00
Wrong use of boolean, should be different
This commit is contained in:
parent
5fc7d6382d
commit
e6637b9af8
@ -172,6 +172,8 @@ public class UpdateManager {
|
||||
}
|
||||
|
||||
if (cancelled) {
|
||||
System.out.println("Update cancelled by user!");
|
||||
System.exit(1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ public interface IUserInterface {
|
||||
|
||||
void executeManager(Runnable task);
|
||||
|
||||
// Return true if the installation was cancelled!
|
||||
Future<Boolean> showOptions(List<IOptionDetails> option);
|
||||
|
||||
}
|
||||
|
@ -102,14 +102,14 @@ public class OptionsSelectWindow extends JDialog implements ActionListener {
|
||||
addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
future.complete(false);
|
||||
future.complete(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowClosed(WindowEvent e) {
|
||||
// Just in case closing didn't get triggered - if something else called dispose() the
|
||||
// future will have already completed
|
||||
future.complete(false);
|
||||
future.complete(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -189,10 +189,10 @@ public class OptionsSelectWindow extends JDialog implements ActionListener {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (e.getActionCommand().equals("OK")) {
|
||||
tableModel.finalise();
|
||||
future.complete(true);
|
||||
future.complete(false);
|
||||
dispose();
|
||||
} else if (e.getActionCommand().equals("Cancel")) {
|
||||
future.complete(false);
|
||||
future.complete(true);
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user