mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-26 02:15:47 +00:00
Fix icons race condition
This commit is contained in:
@@ -79,6 +79,7 @@ public class BaseMode extends OperationMode {
|
||||
}
|
||||
|
||||
var imagesLoaded = new CountDownLatch(1);
|
||||
var iconsLoaded = new CountDownLatch(1);
|
||||
var browserLoaded = new CountDownLatch(1);
|
||||
var shellLoaded = new CountDownLatch(1);
|
||||
var storageLoaded = new CountDownLatch(1);
|
||||
@@ -113,6 +114,7 @@ public class BaseMode extends OperationMode {
|
||||
});
|
||||
imagesLoaded.await();
|
||||
browserLoaded.await();
|
||||
iconsLoaded.await();
|
||||
AppDialog.waitForAllDialogsClose();
|
||||
PlatformThread.runLaterIfNeededBlocking(() -> {
|
||||
try {
|
||||
@@ -136,6 +138,7 @@ public class BaseMode extends OperationMode {
|
||||
imagesLoaded.countDown();
|
||||
storageLoaded.await();
|
||||
SystemIconManager.init();
|
||||
iconsLoaded.countDown();
|
||||
},
|
||||
() -> {
|
||||
BrowserIconManager.loadIfNecessary();
|
||||
|
||||
@@ -103,7 +103,11 @@ public class AppImages {
|
||||
}
|
||||
|
||||
var key = file.contains(":") ? file : "app:" + file;
|
||||
return images.containsKey(key);
|
||||
if (images.containsKey(key)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Image image(String file) {
|
||||
|
||||
Reference in New Issue
Block a user