get rid of UI-side watching of directories on AllFilesLoadedEvent

This commit is contained in:
Zlatin Balevsky
2020-03-26 05:31:05 +00:00
parent 11e320ef53
commit f0c8c11094
3 changed files with 0 additions and 18 deletions

View File

@ -28,7 +28,6 @@ class FilesModel {
core.eventBus.register(FileLoadedEvent.class, this)
core.eventBus.register(FileUnsharedEvent.class, this)
core.eventBus.register(FileHashedEvent.class, this)
core.eventBus.register(AllFilesLoadedEvent.class, this)
Runnable refreshModel = {refreshModel()}
Timer timer = new Timer(true)
@ -38,15 +37,6 @@ class FilesModel {
}
void onAllFilesLoadedEvent(AllFilesLoadedEvent e) {
def eventBus = core.eventBus
guiThread.invokeLater {
core.muOptions.watchedDirectories.each {
eventBus.publish(new FileSharedEvent(file: new File(it)))
}
}
}
void onFileLoadedEvent(FileLoadedEvent e) {
guiThread.invokeLater {
sharedFiles.add(e.loadedFile)

View File

@ -294,8 +294,6 @@ class MainFrameModel {
void onAllFilesLoadedEvent(AllFilesLoadedEvent e) {
runInsideUIAsync {
core.muOptions.watchedDirectories.each { core.eventBus.publish(new FileSharedEvent(file : new File(it))) }
core.muOptions.trustSubscriptions.each {
core.eventBus.publish(new TrustSubscriptionEvent(persona : it, subscribe : true))
}

View File

@ -193,12 +193,6 @@ public class MuWireClient {
}
public void onAllFilesLoadedEvent(AllFilesLoadedEvent e) {
core.getMuOptions().getWatchedDirectories().stream().map(File::new).
forEach(f -> {
FileSharedEvent event = new FileSharedEvent();
event.setFile(f);
core.getEventBus().publish(event);
});
core.getMuOptions().getTrustSubscriptions().forEach( p -> {
TrustSubscriptionEvent event = new TrustSubscriptionEvent();