Update jGui

This commit is contained in:
Jonas Herzig
2020-11-07 13:18:10 +01:00
parent 6308b8a859
commit ec862f0596
10 changed files with 108 additions and 217 deletions

View File

@@ -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;