mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-25 00:52:31 -04:00
Small fixes
This commit is contained in:
@@ -34,10 +34,17 @@ public class UserReportComp extends SimpleComp {
|
||||
private final ErrorEvent event;
|
||||
private final Stage stage;
|
||||
|
||||
private boolean sent;
|
||||
|
||||
public UserReportComp(ErrorEvent event, Stage stage) {
|
||||
this.event = event;
|
||||
this.includedDiagnostics = new SimpleListProperty<>(FXCollections.observableArrayList());
|
||||
this.stage = stage;
|
||||
stage.setOnHidden(event1 -> {
|
||||
if (!sent) {
|
||||
ErrorAction.ignore().handle(event);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void show(ErrorEvent event) {
|
||||
@@ -115,6 +122,7 @@ public class UserReportComp extends SimpleComp {
|
||||
includedDiagnostics.forEach(event::addAttachment);
|
||||
event.attachUserReport(text.get());
|
||||
SentryErrorHandler.getInstance().handle(event);
|
||||
sent = true;
|
||||
stage.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ public abstract class DataStorage {
|
||||
|
||||
public synchronized List<DataStore> getUsableStores() {
|
||||
return new ArrayList<>(getStoreEntries().stream()
|
||||
.filter(entry -> !entry.isDisabled())
|
||||
.filter(entry -> entry.getState().isUsable())
|
||||
.map(DataStoreEntry::getStore)
|
||||
.toList());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user