mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-11-07 13:04:32 +01:00
Improvements to MultiMC metadata updating
Reformatted and refactored names to fit Kotlin conventions Closed manifest file reader properly Fixed switching between loaders, improved intermediary logic Improved error messages
This commit is contained in:
@@ -202,17 +202,16 @@ class GUIHandler : IUserInterface {
|
||||
|
||||
|
||||
val options = arrayOf("Cancel", "Continue anyways", "Update")
|
||||
val result = JOptionPane.showOptionDialog(frmPackwizlauncher,
|
||||
message,
|
||||
val result = JOptionPane.showOptionDialog(frmPackwizlauncher, message,
|
||||
"Updating MultiMC versions",
|
||||
JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0])
|
||||
JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[2])
|
||||
future.complete(
|
||||
when (result) {
|
||||
JOptionPane.CLOSED_OPTION, 0 -> IUserInterface.UpdateConfirmationResult.CANCELLED
|
||||
1 -> IUserInterface.UpdateConfirmationResult.CONTINUE
|
||||
2 -> IUserInterface.UpdateConfirmationResult.UPDATE
|
||||
else -> IUserInterface.UpdateConfirmationResult.CANCELLED
|
||||
}
|
||||
when (result) {
|
||||
JOptionPane.CLOSED_OPTION, 0 -> IUserInterface.UpdateConfirmationResult.CANCELLED
|
||||
1 -> IUserInterface.UpdateConfirmationResult.CONTINUE
|
||||
2 -> IUserInterface.UpdateConfirmationResult.UPDATE
|
||||
else -> IUserInterface.UpdateConfirmationResult.CANCELLED
|
||||
}
|
||||
)
|
||||
}
|
||||
return future.get()
|
||||
|
||||
Reference in New Issue
Block a user