Small fixes

This commit is contained in:
crschnick 2023-05-01 07:06:12 +00:00
parent 45de844680
commit cb0324f81a
2 changed files with 6 additions and 1 deletions

View file

@ -52,6 +52,7 @@ public class SvgCacheComp extends SimpleComp {
back.prefWidthProperty().bind(width);
back.prefHeightProperty().bind(height);
var animation = new AtomicReference<PauseTransition>();
var active = new SimpleObjectProperty<PauseTransition>();
svgFile.addListener((observable, oldValue, newValue) -> {
var cached = cache.getCached(newValue);
webViewContent.setValue(newValue != null || cached.isEmpty() ? AppImages.svgImage(newValue) : null);
@ -65,13 +66,14 @@ public class SvgCacheComp extends SimpleComp {
}
var pt = new PauseTransition();
active.set(pt);
pt.setDuration(Duration.millis(500));
pt.setOnFinished(actionEvent -> {
if (newValue == null || cache.getCached(newValue).isPresent()) {
return;
}
if (!newValue.equals(svgFile.getValue())) {
if (!active.get().equals(pt)) {
return;
}

View file

@ -41,6 +41,9 @@ public class SentryErrorHandler implements ErrorHandler {
options.setTag("osVersion", System.getProperty("os.version"));
options.setTag("arch", System.getProperty("os.arch"));
options.setDist(XPipeDistributionType.get().getId());
if (AppProperties.get().isStaging()) {
options.setTag("staging", "true");
}
});
}
init = true;