mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Small fixes
This commit is contained in:
parent
45de844680
commit
cb0324f81a
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue