Update jGui
This commit is contained in:
@@ -245,18 +245,10 @@ public class Utils {
|
||||
|
||||
logger.trace("Opening crash report popup GUI");
|
||||
GuiCrashReportPopup popup = new GuiCrashReportPopup(container, crashReportStr);
|
||||
Futures.addCallback(popup.getFuture(), new FutureCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void result) {
|
||||
logger.trace("Crash report popup closed");
|
||||
if (onClose != null) {
|
||||
onClose.run();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
logger.error("During error popup:", t);
|
||||
popup.onClosed(() -> {
|
||||
logger.trace("Crash report popup closed");
|
||||
if (onClose != null) {
|
||||
onClose.run();
|
||||
}
|
||||
});
|
||||
return popup;
|
||||
@@ -329,18 +321,10 @@ public class Utils {
|
||||
LOGGER.trace("Minimal mode active, denying action, opening popup");
|
||||
|
||||
MinimalModeUnsupportedPopup popup = new MinimalModeUnsupportedPopup(container);
|
||||
Futures.addCallback(popup.getFuture(), new FutureCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void result) {
|
||||
LOGGER.trace("Minimal mode popup closed");
|
||||
if (onPopupClosed != null) {
|
||||
onPopupClosed.run();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
LOGGER.error("During minimal mode popup:", t);
|
||||
popup.onClosed(() -> {
|
||||
LOGGER.trace("Minimal mode popup closed");
|
||||
if (onPopupClosed != null) {
|
||||
onPopupClosed.run();
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user