diff --git a/cli-lanterna/src/main/groovy/com/muwire/clilanterna/FilesView.groovy b/cli-lanterna/src/main/groovy/com/muwire/clilanterna/FilesView.groovy index f7cf6e78..2d7aba3a 100644 --- a/cli-lanterna/src/main/groovy/com/muwire/clilanterna/FilesView.groovy +++ b/cli-lanterna/src/main/groovy/com/muwire/clilanterna/FilesView.groovy @@ -21,7 +21,6 @@ import com.muwire.core.filecert.UICreateCertificateEvent import com.muwire.core.files.DirectoryUnsharedEvent import com.muwire.core.files.FileSharedEvent import com.muwire.core.files.FileUnsharedEvent -import com.muwire.core.files.UIPersistFilesEvent class FilesView extends BasicWindow { private final FilesModel model @@ -84,7 +83,6 @@ class FilesView extends BasicWindow { Button unshareButton = new Button("Unshare", { core.eventBus.publish(new FileUnsharedEvent(unsharedFile : sf)) - core.eventBus.publish(new UIPersistFilesEvent()) MessageDialog.showMessageDialog(textGUI, "File Unshared", "Unshared "+sf.getFile().getName(), MessageDialogButton.OK) } ) Button addCommentButton = new Button("Add Comment", { diff --git a/core/src/main/groovy/com/muwire/core/Core.groovy b/core/src/main/groovy/com/muwire/core/Core.groovy index 97dbada5..cd1148bd 100644 --- a/core/src/main/groovy/com/muwire/core/Core.groovy +++ b/core/src/main/groovy/com/muwire/core/Core.groovy @@ -43,7 +43,7 @@ import com.muwire.core.files.HasherService import com.muwire.core.files.PersisterService import com.muwire.core.files.SideCarFileEvent import com.muwire.core.files.UICommentEvent -import com.muwire.core.files.UIPersistFilesEvent + import com.muwire.core.files.AllFilesLoadedEvent import com.muwire.core.files.DirectoryUnsharedEvent import com.muwire.core.files.DirectoryWatchedEvent @@ -264,7 +264,6 @@ public class Core { log.info "initializing folder persistence service" persisterFolderService = new PersisterFolderService(new File(home, "files"), eventBus) eventBus.register(PersisterDoneEvent.class, persisterFolderService) - eventBus.register(UIPersistFilesEvent.class, persisterFolderService) eventBus.register(FileHashedEvent.class, persisterFolderService) eventBus.register(FileUnsharedEvent.class, persisterFolderService) diff --git a/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy b/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy index 642f8166..9658b10e 100644 --- a/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy +++ b/core/src/main/groovy/com/muwire/core/files/PersisterFolderService.groovy @@ -52,10 +52,6 @@ class PersisterFolderService extends BasePersisterService { load() } - void onUIPersistFilesEvent(UIPersistFilesEvent e) { - persistFiles() - } - void onFileHashedEvent(FileHashedEvent hashedEvent) { persistFile(hashedEvent.sharedFile) } diff --git a/core/src/main/groovy/com/muwire/core/files/UIPersistFilesEvent.groovy b/core/src/main/groovy/com/muwire/core/files/UIPersistFilesEvent.groovy deleted file mode 100644 index 6cfbc76c..00000000 --- a/core/src/main/groovy/com/muwire/core/files/UIPersistFilesEvent.groovy +++ /dev/null @@ -1,6 +0,0 @@ -package com.muwire.core.files - -import com.muwire.core.Event - -class UIPersistFilesEvent extends Event { -}