mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Block repeated error popups
This commit is contained in:
parent
2701af82bc
commit
5a6083fec3
1 changed files with 9 additions and 5 deletions
|
@ -80,6 +80,7 @@ public class BitsquareApp extends Application {
|
||||||
|
|
||||||
private BitsquareAppModule bitsquareAppModule;
|
private BitsquareAppModule bitsquareAppModule;
|
||||||
private Injector injector;
|
private Injector injector;
|
||||||
|
private boolean popupOpened;
|
||||||
|
|
||||||
public static Stage getPrimaryStage() {
|
public static Stage getPrimaryStage() {
|
||||||
return primaryStage;
|
return primaryStage;
|
||||||
|
@ -227,11 +228,14 @@ public class BitsquareApp extends Application {
|
||||||
try {
|
try {
|
||||||
throwable.printStackTrace();
|
throwable.printStackTrace();
|
||||||
try {
|
try {
|
||||||
String message = throwable.getMessage();
|
if (!popupOpened) {
|
||||||
if (message != null)
|
String message = throwable.getMessage();
|
||||||
new Popup().error(message).show();
|
popupOpened = true;
|
||||||
else
|
if (message != null)
|
||||||
new Popup().error(throwable.toString()).show();
|
new Popup().error(message).onClose(() -> popupOpened = false).show();
|
||||||
|
else
|
||||||
|
new Popup().error(throwable.toString()).onClose(() -> popupOpened = false).show();
|
||||||
|
}
|
||||||
} catch (Throwable throwable3) {
|
} catch (Throwable throwable3) {
|
||||||
log.error("Error at displaying Throwable.");
|
log.error("Error at displaying Throwable.");
|
||||||
throwable3.printStackTrace();
|
throwable3.printStackTrace();
|
||||||
|
|
Loading…
Add table
Reference in a new issue