feat: complete notification cycle for automatic UI refresh
This commit is contained in:
@@ -113,12 +113,27 @@ public class DefaultDownloadManager implements IDownloadManager {
|
||||
|
||||
} finally {
|
||||
if (finishedCalled.compareAndSet(false, true)) {
|
||||
notifyComfyUI(); // NEU: Ping abfeuern
|
||||
onFinished.run();
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
// NEU: Benachrichtigt ComfyUI
|
||||
private void notifyComfyUI() {
|
||||
try {
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create("http://127.0.0.1:8188/kippster/model-downloaded"))
|
||||
.POST(HttpRequest.BodyPublishers.noBody())
|
||||
.build();
|
||||
// Fire and forget
|
||||
httpClient.sendAsync(request, HttpResponse.BodyHandlers.discarding());
|
||||
} catch (Exception e) {
|
||||
// Wenn ComfyUI nicht läuft, ignorieren wir das leise
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isSelected(int index) {
|
||||
return currentSelection == null || (index < currentSelection.length && currentSelection[index]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user