Move persisting of files on dedicated thread. Introduce an event to forcefully persist files. Do that immediately after unsharing anything

This commit is contained in:
Zlatin Balevsky
2019-10-15 04:21:40 +01:00
parent d22b403e2a
commit feb712c253
4 changed files with 34 additions and 12 deletions

View File

@@ -25,6 +25,7 @@ import com.muwire.core.download.UIDownloadPausedEvent
import com.muwire.core.download.UIDownloadResumedEvent
import com.muwire.core.files.DirectoryUnsharedEvent
import com.muwire.core.files.FileUnsharedEvent
import com.muwire.core.files.UIPersistFilesEvent
import com.muwire.core.search.QueryEvent
import com.muwire.core.search.SearchEvent
import com.muwire.core.trust.RemoteTrustList
@@ -276,6 +277,7 @@ class MainFrameController {
sf.each {
core.eventBus.publish(new FileUnsharedEvent(unsharedFile : it))
}
core.eventBus.publish(new UIPersistFilesEvent())
}
@ControllerAction