JAL-3878 Fire service changed event after discovery task is done.
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Fri, 24 Sep 2021 16:05:44 +0000 (18:05 +0200)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Fri, 24 Sep 2021 16:05:44 +0000 (18:05 +0200)
src/jalview/ws2/slivka/SlivkaWSDiscoverer.java

index f2dd9ee..b55035b 100644 (file)
@@ -132,6 +132,7 @@ public class SlivkaWSDiscoverer implements WebServiceDiscoverer
               reloadServices();
               return SlivkaWSDiscoverer.this;
             });
+    task.thenRun(() -> fireServicesChanged(getServices()));
     discoveryTasks.add(task);
     return task;
   }
@@ -180,7 +181,6 @@ public class SlivkaWSDiscoverer implements WebServiceDiscoverer
     }
     this.services = allServices;
     Cache.log.info("Reloading slivka services finished");
-    fireServicesChanged(getServices());
     return allServices;
   }